11# Manticore Python client
22
3- WARNING: this is a development version of the client. The latest release's readme is https://github.com/manticoresoftware/manticoresearch-python-asyncio/tree/1.0.0
3+ Сlient for Manticore Search.
44
5- ## Requirements.
6-
7- Minimum Manticore Search version is >= 6.2.0 with HTTP protocol enabled.
85
9- | ** manticoresearch-python-asyncio* | ** Manticore Search** | ** Python** | ** Compatibility** |
10- | -----------------------------------| ----------------------------------- | -------------- | ------------------------|
11- | ` manticoresearch-devel ` | ` dev ` (latest development version) | 3.4 or newer | ✅ Fully Compatible |
12- | 1.0.0 or newer | 9.2.14 or newer | 3.4 or newer | ✅ Fully Compatible |
13- | 1.0.0 or newer | 6.2.0 to 9.2.14 | 3.4 or newer | ⚠️ Partially Compatible |
14- | 1.0.0 or newer | 2.5.1 to 6.2.0 | 3.4 or newer | ❗ Incompatible |
6+ ❗ WARNING: this is a development version of the client. The latest release's readme is https://github.com/manticoresoftware/manticoresearch-python-asyncio/tree/1.0.0
157
16- ## Usage
17- To run the server, please execute the following from the root directory:
8+ ## Requirements.
189
10+ Minimum Manticore Search version is >= 2.5.1 with HTTP protocol enabled.
11+
12+ | ** manticoresearch-python* | ** Manticore Search** | ** Python** | ** Compatibility** |
13+ | --------------------------- | ----------------------------------- | -------------- | ------------------------|
14+ | ` manticoresearch-devel ` | ` dev ` (latest development version) | 3.4 or newer | ✅ Fully Compatible |
15+ | 8.0.0 or newer | 9.2.14 or newer | 3.4 or newer | ✅ Fully Compatible |
16+ | 6.0.0 to 8.0.0 | 9.2.14 or newer | 3.4 or newer | ⚠️ Partially Compatible |
17+ | 6.0.0 to 8.0.0 | 7.0.0 to 9.2.14 | 3.4 or newer | ✅ Fully Compatible |
18+ | 6.0.0 or newer | 6.2.1 to 7.0.0 | 3.4 or newer | ⚠️ Partially Compatible |
19+ | 3.3.1 to 6.0.0 | 7.0.0 or newer | 3.4 or newer | ⚠️ Partially Compatible |
20+ | 3.3.1 to 6.0.0 | 6.2.1 to 7.0.0 | 3.4 or newer | ✅ Fully Compatible |
21+ | 2.0.0 to 3.3.1 | 6.2.0 or newer | 3.4 or newer | ⚠️ Partially Compatible |
22+ | 2.0.0 to 3.3.1 | 4.2.1 to 6.2.0 | 3.4 or newer | ✅ Fully Compatible |
23+ | 1.0.6 to 2.0.0 | 4.0.2 to 4.2.1 | 3.4 or newer | ✅ Fully Compatible |
24+ | 1.0.5 to 1.0.6 | 4.0.2 to 4.2.1 | 2.7 or newer | ⚠️ Partially Compatible |
25+ | 1.0.5 to 1.0.6 | 2.5.1 to 4.0.2 | 2.7 or newer | ✅ Fully Compatible |
26+
27+ ## Installation & Usage
28+ ### pip install
29+
30+ If the python package is hosted on a repository, you can install directly using:
31+
32+ ``` sh
33+ pip install git+https://github.com/manticoresoftware/manticoresearch-python-asyncio.git
1934```
20- pip3 install -r requirements.txt
21- python3 -m manticoresearch
22- ```
23-
24- and open your browser to here:
35+ (you may need to run ` pip ` with root permission: ` sudo pip install git+https://github.com/manticoresoftware/manticoresearch-python-asyncio.git ` )
2536
26- ```
27- http://localhost:/ui/
37+ Then import the package:
38+ ``` python
39+ import manticoresearch
2840```
2941
30- Your OpenAPI definition lives here:
42+ ### Setuptools
3143
32- ```
33- http://localhost:/openapi.json
34- ```
44+ Install via [ Setuptools] ( http://pypi.python.org/pypi/setuptools ) .
3545
36- To launch the integration tests, use pytest:
37- ```
38- sudo pip install -r test-requirements.txt
39- pytest
46+ ``` sh
47+ python setup.py install --user
4048```
49+ (or ` sudo python setup.py install ` to install the package for all users)
4150
42- ## Prevent file overriding
43-
44- After first generation, add edited files to _ .openapi-generator-ignore_ to prevent generator from overwriting them. Typically:
45- ```
46- server/controllers/*
47- test/*
48- *.txt
51+ Then import the package:
52+ ``` python
53+ import manticoresearch
4954```
5055
5156## Getting Started
5257
53- Please follow the installation procedure and then run the following example :
58+ Please follow the [ installation procedure] ( #installation--usage ) and then run the following:
5459
5560``` python
5661import manticoresearch
@@ -64,8 +69,9 @@ configuration = manticoresearch.Configuration(
6469)
6570
6671
72+
6773# Enter a context with an instance of the API client
68- async with manticoresearch.ApiClient(configuration) as api_client:
74+ with manticoresearch.ApiClient(configuration) as api_client:
6975 # Create instances of API classes
7076 indexApi = manticoresearch.IndexApi(api_client)
7177 searchApi = manticoresearch.SearchApi(api_client)
@@ -75,31 +81,109 @@ async with manticoresearch.ApiClient(configuration) as api_client:
7581 # Perform insert and search operations
7682 newDoc = {" title" : " Crossbody Bag with Tassel" , " price" : 19.85 }
7783 insert_request = InsertDocumentRequest(index = " products" , doc = newDoc)
78- await indexApi.insert(insert_request)
84+ indexApi.insert(insert_request)
7985
8086 # Check out the structure of the autocreated 'products' table
81- sql_response = await utilsApi.sql(' DESC products' );
87+ sql_response = utilsApi.sql(' DESC products' );
8288 print (" The response of UtilsApi->sql:\n " )
8389 pprint(sql_response)
8490
8591 newDoc = {" title" : " Pet Hair Remover Glove" , " price" : 7.99 }
8692 insert_request = InsertDocumentRequest(index = " products" , doc = newDoc)
87- await indexApi.insert(insert_request)
93+ indexApi.insert(insert_request)
8894
8995 query_highlight = Highlight()
9096 query_highlight.fields = {" title" :{}}
9197 search_query = SearchQuery(query_string = " @title bag" )
9298 search_request = SearchRequest(index = " products" , query = search_query, highlight = query_highlight)
93- search_response = await searchApi.search(search_request)
99+ search_response = searchApi.search(search_request)
94100 print (" The response of SearchApi->search:\n " )
95101 pprint(search_response)
96102
97103 # Alternatively, you can pass all request arguments as a complex JSON object
98- await indexApi.insert({" index" : " products" , " doc" : {" title" : " Crossbody Bag with Tassel" , " price" : 19.85 }})
99- await indexApi.insert({" index" : " products" , " doc" : {" title" : " Pet Hair Remover Glove" , " price" : 7.99 }})
100- search_response = await searchApi.search({" index" : " products" , " query" : {" query_string" : " @title bag" }, " highlight" :{" fields" :{" title" :{}}}})
104+ indexApi.insert({" index" : " products" , " doc" : {" title" : " Crossbody Bag with Tassel" , " price" : 19.85 }})
105+ indexApi.insert({" index" : " products" , " doc" : {" title" : " Pet Hair Remover Glove" , " price" : 7.99 }})
106+ search_response = searchApi.search({" index" : " products" , " query" : {" query_string" : " @title bag" }, " highlight" :{" fields" :{" title" :{}}}})
101107 print (" The response of SearchApi->search:\n " )
102108 pprint(search_response)
103109 except ApiException as e:
104110 print (" Exception when calling Api method: %s \n " % e)
105111```
112+
113+ ## Documentation for API Endpoints
114+
115+ All URIs are relative to * http://127.0.0.1:9308 *
116+
117+ Class | Method | HTTP request | Description
118+ ------------ | ------------- | ------------- | -------------
119+ * IndexApi* | [ ** bulk** ] ( docs/IndexApi.md#bulk ) | ** POST** /bulk | Bulk table operations
120+ * IndexApi* | [ ** delete** ] ( docs/IndexApi.md#delete ) | ** POST** /delete | Delete a document in a table
121+ * IndexApi* | [ ** insert** ] ( docs/IndexApi.md#insert ) | ** POST** /insert | Create a new document in a table
122+ * IndexApi* | [ ** partial_replace** ] ( docs/IndexApi.md#partial_replace ) | ** POST** /{table}/_ update/{id} | Partially replaces a document in a table
123+ * IndexApi* | [ ** replace** ] ( docs/IndexApi.md#replace ) | ** POST** /replace | Replace new document in a table
124+ * IndexApi* | [ ** update** ] ( docs/IndexApi.md#update ) | ** POST** /update | Update a document in a table
125+ * SearchApi* | [ ** autocomplete** ] ( docs/SearchApi.md#autocomplete ) | ** POST** /autocomplete | Performs an autocomplete search on a table
126+ * SearchApi* | [ ** percolate** ] ( docs/SearchApi.md#percolate ) | ** POST** /pq/{table}/search | Perform reverse search on a percolate table
127+ * SearchApi* | [ ** search** ] ( docs/SearchApi.md#search ) | ** POST** /search | Performs a search on a table
128+ * UtilsApi* | [ ** sql** ] ( docs/UtilsApi.md#sql ) | ** POST** /sql | Perform SQL requests
129+
130+
131+ ## Documentation For Models
132+
133+ - [ AggComposite] ( docs/AggComposite.md )
134+ - [ AggCompositeSource] ( docs/AggCompositeSource.md )
135+ - [ AggCompositeTerm] ( docs/AggCompositeTerm.md )
136+ - [ AggDateHistogram] ( docs/AggDateHistogram.md )
137+ - [ AggHistogram] ( docs/AggHistogram.md )
138+ - [ AggTerms] ( docs/AggTerms.md )
139+ - [ Aggregation] ( docs/Aggregation.md )
140+ - [ AutocompleteRequest] ( docs/AutocompleteRequest.md )
141+ - [ BoolFilter] ( docs/BoolFilter.md )
142+ - [ BulkResponse] ( docs/BulkResponse.md )
143+ - [ DeleteDocumentRequest] ( docs/DeleteDocumentRequest.md )
144+ - [ DeleteResponse] ( docs/DeleteResponse.md )
145+ - [ ErrorResponse] ( docs/ErrorResponse.md )
146+ - [ FulltextFilter] ( docs/FulltextFilter.md )
147+ - [ GeoDistance] ( docs/GeoDistance.md )
148+ - [ GeoDistanceLocationAnchor] ( docs/GeoDistanceLocationAnchor.md )
149+ - [ Highlight] ( docs/Highlight.md )
150+ - [ HighlightFieldOption] ( docs/HighlightFieldOption.md )
151+ - [ HighlightFields] ( docs/HighlightFields.md )
152+ - [ HitsHits] ( docs/HitsHits.md )
153+ - [ InsertDocumentRequest] ( docs/InsertDocumentRequest.md )
154+ - [ Join] ( docs/Join.md )
155+ - [ JoinCond] ( docs/JoinCond.md )
156+ - [ JoinOn] ( docs/JoinOn.md )
157+ - [ Knn] ( docs/Knn.md )
158+ - [ KnnQuery] ( docs/KnnQuery.md )
159+ - [ Match] ( docs/Match.md )
160+ - [ MatchAll] ( docs/MatchAll.md )
161+ - [ PercolateRequest] ( docs/PercolateRequest.md )
162+ - [ PercolateRequestQuery] ( docs/PercolateRequestQuery.md )
163+ - [ QueryFilter] ( docs/QueryFilter.md )
164+ - [ Range] ( docs/Range.md )
165+ - [ ReplaceDocumentRequest] ( docs/ReplaceDocumentRequest.md )
166+ - [ ResponseError] ( docs/ResponseError.md )
167+ - [ ResponseErrorDetails] ( docs/ResponseErrorDetails.md )
168+ - [ SearchQuery] ( docs/SearchQuery.md )
169+ - [ SearchRequest] ( docs/SearchRequest.md )
170+ - [ SearchResponse] ( docs/SearchResponse.md )
171+ - [ SearchResponseHits] ( docs/SearchResponseHits.md )
172+ - [ SourceRules] ( docs/SourceRules.md )
173+ - [ SqlObjResponse] ( docs/SqlObjResponse.md )
174+ - [ SqlResponse] ( docs/SqlResponse.md )
175+ - [ SuccessResponse] ( docs/SuccessResponse.md )
176+ - [ UpdateDocumentRequest] ( docs/UpdateDocumentRequest.md )
177+ - [ UpdateResponse] ( docs/UpdateResponse.md )
178+
179+
180+ <a id =" documentation-for-authorization " ></a >
181+ ## Documentation For Authorization
182+
183+ Endpoints do not require authorization.
184+
185+
186+ ## Author
187+
188+ info@manticoresearch.com
189+
0 commit comments