Skip to content

Commit 23ec425

Browse files
committed
Fixed documentation examples
1 parent e2ff78e commit 23ec425

File tree

8 files changed

+14
-15
lines changed

8 files changed

+14
-15
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ from __future__ import print_function
4444

4545
import time
4646
import manticoresearch
47+
from manticoresearch import *
4748
from manticoresearch.rest import ApiException
4849
from pprint import pprint
4950

@@ -59,7 +60,7 @@ configuration = manticoresearch.Configuration(
5960
with manticoresearch.ApiClient(configuration) as api_client:
6061
# Create an instance of the API class
6162
api_instance = manticoresearch.IndexApi(api_client)
62-
body = "body_example" # str |
63+
body = '{"insert": {"index": "test", "id": 1, "doc": {"title": "Title 1"}}},\n{"insert": {"index": "test", "id": 2, "doc": {"title": "Title 2"}}}' # str |
6364

6465
try:
6566
# Bulk index operations

docs/BulkResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Success bulk response
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**items** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](.md) | | [optional]
7+
**items** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional]
88
**error** | **bool** | | [optional]
99

1010
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/DeleteDocumentRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
77
**index** | **str** | Index name |
88
**cluster** | **str** | cluster name | [optional]
99
**id** | **int** | Document ID | [optional]
10-
**query** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](.md) | Query tree object | [optional]
10+
**query** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Query tree object | [optional]
1111

1212
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1313

docs/IndexApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ configuration = manticoresearch.Configuration(
5757
with manticoresearch.ApiClient(configuration) as api_client:
5858
# Create an instance of the API class
5959
api_instance = manticoresearch.IndexApi(api_client)
60-
body = "body_example" # str |
60+
body = '{"insert": {"index": "test", "id": 1, "doc": {"title": "Title 1"}}},\n{"insert": {"index": "test", "id": 2, "doc": {"title": "Title 2"}}}' # str |
6161

6262
try:
6363
# Bulk index operations

docs/SearchApi.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,11 @@ with manticoresearch.ApiClient(configuration) as api_client:
140140
api_instance = manticoresearch.SearchApi(api_client)
141141
search_request = SearchRequest(
142142
index="test",
143-
query={},
143+
query={"match_all":{}},
144144
limit=1,
145145
offset=1,
146146
max_matches=1,
147-
sort=[
148-
{},
149-
],
147+
sort=[{"test":"asc"},"id"],
150148
aggs={},
151149
expressions={},
152150
highlight={},

docs/SearchRequest.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ Payload for search operation
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**index** | **str** | |
8-
**query** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | |
8+
**query** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]** | |
99
**limit** | **int** | | [optional]
1010
**offset** | **int** | | [optional]
1111
**max_matches** | **int** | | [optional]
1212
**sort** | **[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]** | | [optional]
1313
**aggs** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional]
14-
**expressions** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](.md) | | [optional]
15-
**highlight** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](.md) | | [optional]
14+
**expressions** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional]
15+
**highlight** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional]
1616
**source** | **[str]** | | [optional]
1717
**profile** | **bool** | | [optional]
1818

docs/SearchResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
88
**timed_out** | **bool** | | [optional]
99
**aggregations** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional]
1010
**hits** | [**SearchResponseHits**](SearchResponseHits.md) | | [optional]
11-
**profile** | [**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}**](.md) | | [optional]
11+
**profile** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional]
1212
**warning** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | | [optional]
1313

1414
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

manticoresearch/model/search_request.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class SearchRequest(object):
3232
"""
3333
openapi_types = {
3434
'index': 'str',
35-
'query': '{str: (bool, date, datetime, dict, float, int, list, str, none_type)}',
35+
'query': '[{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]',
3636
'limit': 'int',
3737
'offset': 'int',
3838
'max_matches': 'int',
@@ -127,7 +127,7 @@ def query(self):
127127
128128
129129
:return: The query of this SearchRequest. # noqa: E501
130-
:rtype: {str: (bool, date, datetime, dict, float, int, list, str, none_type)}
130+
:rtype: [{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]
131131
"""
132132
return self._query
133133

@@ -137,7 +137,7 @@ def query(self, query):
137137
138138
139139
:param query: The query of this SearchRequest. # noqa: E501
140-
:type query: {str: (bool, date, datetime, dict, float, int, list, str, none_type)}
140+
:type query: [{str: (bool, date, datetime, dict, float, int, list, str, none_type)}]
141141
"""
142142
if self.local_vars_configuration.client_side_validation and query is None: # noqa: E501
143143
raise ValueError("Invalid value for `query`, must not be `None`") # noqa: E501

0 commit comments

Comments
 (0)