manticore-client 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +39 -0
  3. data/.openapi-generator/FILES +149 -0
  4. data/.openapi-generator/VERSION +1 -0
  5. data/.openapi-generator-ignore +5 -0
  6. data/.rspec +2 -0
  7. data/.rubocop.yml +160 -0
  8. data/Gemfile +12 -0
  9. data/Gemfile.lock +103 -0
  10. data/LICENSE.txt +21 -0
  11. data/README.md +136 -0
  12. data/Rakefile +10 -0
  13. data/docs/AggComposite.md +20 -0
  14. data/docs/AggCompositeSource.md +18 -0
  15. data/docs/AggCompositeTerm.md +18 -0
  16. data/docs/AggTerms.md +20 -0
  17. data/docs/Aggregation.md +22 -0
  18. data/docs/AutocompleteRequest.md +22 -0
  19. data/docs/BoolFilter.md +22 -0
  20. data/docs/BulkResponse.md +26 -0
  21. data/docs/DeleteDocumentRequest.md +24 -0
  22. data/docs/DeleteResponse.md +26 -0
  23. data/docs/ErrorResponse.md +20 -0
  24. data/docs/FulltextFilter.md +24 -0
  25. data/docs/GeoDistance.md +24 -0
  26. data/docs/GeoDistanceLocationAnchor.md +20 -0
  27. data/docs/Highlight.md +62 -0
  28. data/docs/HighlightAllOfFields.md +15 -0
  29. data/docs/HighlightFieldOption.md +26 -0
  30. data/docs/HitsHits.md +22 -0
  31. data/docs/IndexApi.md +401 -0
  32. data/docs/InsertDocumentRequest.md +24 -0
  33. data/docs/Join.md +24 -0
  34. data/docs/JoinCond.md +22 -0
  35. data/docs/JoinOn.md +22 -0
  36. data/docs/KnnQuery.md +28 -0
  37. data/docs/Match.md +22 -0
  38. data/docs/MatchAll.md +18 -0
  39. data/docs/PercolateRequest.md +18 -0
  40. data/docs/PercolateRequestQuery.md +18 -0
  41. data/docs/QueryFilter.md +34 -0
  42. data/docs/Range.md +24 -0
  43. data/docs/ReplaceDocumentRequest.md +18 -0
  44. data/docs/ResponseError.md +49 -0
  45. data/docs/ResponseErrorDetails.md +22 -0
  46. data/docs/SearchApi.md +204 -0
  47. data/docs/SearchQuery.md +36 -0
  48. data/docs/SearchRequest.md +46 -0
  49. data/docs/SearchResponse.md +30 -0
  50. data/docs/SearchResponseHits.md +24 -0
  51. data/docs/SourceRules.md +20 -0
  52. data/docs/SqlResponse.md +49 -0
  53. data/docs/SuccessResponse.md +28 -0
  54. data/docs/UpdateDocumentRequest.md +26 -0
  55. data/docs/UpdateResponse.md +24 -0
  56. data/docs/UtilsApi.md +76 -0
  57. data/lib/manticore/client/api/index_api.rb +442 -0
  58. data/lib/manticore/client/api/search_api.rb +232 -0
  59. data/lib/manticore/client/api/utils_api.rb +93 -0
  60. data/lib/manticore/client/api_client.rb +437 -0
  61. data/lib/manticore/client/api_error.rb +58 -0
  62. data/lib/manticore/client/configuration.rb +385 -0
  63. data/lib/manticore/client/models/agg_composite.rb +233 -0
  64. data/lib/manticore/client/models/agg_composite_source.rb +238 -0
  65. data/lib/manticore/client/models/agg_composite_term.rb +239 -0
  66. data/lib/manticore/client/models/agg_terms.rb +249 -0
  67. data/lib/manticore/client/models/aggregation.rb +240 -0
  68. data/lib/manticore/client/models/autocomplete_request.rb +276 -0
  69. data/lib/manticore/client/models/bool_filter.rb +247 -0
  70. data/lib/manticore/client/models/bulk_response.rb +264 -0
  71. data/lib/manticore/client/models/delete_document_request.rb +269 -0
  72. data/lib/manticore/client/models/delete_response.rb +262 -0
  73. data/lib/manticore/client/models/error_response.rb +250 -0
  74. data/lib/manticore/client/models/fulltext_filter.rb +252 -0
  75. data/lib/manticore/client/models/geo_distance.rb +306 -0
  76. data/lib/manticore/client/models/geo_distance_location_anchor.rb +232 -0
  77. data/lib/manticore/client/models/highlight.rb +525 -0
  78. data/lib/manticore/client/models/highlight_all_of_fields.rb +105 -0
  79. data/lib/manticore/client/models/highlight_field_option.rb +262 -0
  80. data/lib/manticore/client/models/hits_hits.rb +242 -0
  81. data/lib/manticore/client/models/insert_document_request.rb +286 -0
  82. data/lib/manticore/client/models/join.rb +327 -0
  83. data/lib/manticore/client/models/join_cond.rb +276 -0
  84. data/lib/manticore/client/models/join_on.rb +272 -0
  85. data/lib/manticore/client/models/knn_query.rb +307 -0
  86. data/lib/manticore/client/models/match.rb +290 -0
  87. data/lib/manticore/client/models/match_all.rb +262 -0
  88. data/lib/manticore/client/models/percolate_request.rb +238 -0
  89. data/lib/manticore/client/models/percolate_request_query.rb +238 -0
  90. data/lib/manticore/client/models/query_filter.rb +307 -0
  91. data/lib/manticore/client/models/range.rb +252 -0
  92. data/lib/manticore/client/models/replace_document_request.rb +239 -0
  93. data/lib/manticore/client/models/response_error.rb +105 -0
  94. data/lib/manticore/client/models/response_error_details.rb +261 -0
  95. data/lib/manticore/client/models/search_query.rb +316 -0
  96. data/lib/manticore/client/models/search_request.rb +382 -0
  97. data/lib/manticore/client/models/search_response.rb +281 -0
  98. data/lib/manticore/client/models/search_response_hits.rb +254 -0
  99. data/lib/manticore/client/models/source_rules.rb +236 -0
  100. data/lib/manticore/client/models/sql_response.rb +106 -0
  101. data/lib/manticore/client/models/success_response.rb +272 -0
  102. data/lib/manticore/client/models/update_document_request.rb +296 -0
  103. data/lib/manticore/client/models/update_response.rb +252 -0
  104. data/lib/manticore/client/version.rb +7 -0
  105. data/lib/manticore/client.rb +32 -0
  106. data/lib/manticore-client.rb +3 -0
  107. data/manticore-client.gemspec +34 -0
  108. data/spec/api/index_api_spec.rb +179 -0
  109. data/spec/api/search_api_spec.rb +94 -0
  110. data/spec/api/utils_api_spec.rb +100 -0
  111. data/spec/spec_helper.rb +92 -0
  112. data/spec/support/manticore_sql_helper.rb +33 -0
  113. metadata +218 -0
@@ -0,0 +1,49 @@
1
+ # Manticore::Client::ResponseError
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'manticore/client'
13
+
14
+ Manticore::Client::ResponseError.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'ResponseErrorDetails',
18
+ # :'String'
19
+ # ]
20
+ ```
21
+
22
+ ### build
23
+
24
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
25
+
26
+ #### Example
27
+
28
+ ```ruby
29
+ require 'manticore/client'
30
+
31
+ Manticore::Client::ResponseError.build(data)
32
+ # => #<ResponseErrorDetails:0x00007fdd4aab02a0>
33
+
34
+ Manticore::Client::ResponseError.build(data_that_doesnt_match)
35
+ # => nil
36
+ ```
37
+
38
+ #### Parameters
39
+
40
+ | Name | Type | Description |
41
+ | ---- | ---- | ----------- |
42
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
43
+
44
+ #### Return type
45
+
46
+ - `ResponseErrorDetails`
47
+ - `String`
48
+ - `nil` (if no type matches)
49
+
@@ -0,0 +1,22 @@
1
+ # Manticore::Client::ResponseErrorDetails
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **type** | **String** | Type or category of the error | |
8
+ | **reason** | **String** | Detailed explanation of why the error occurred | [optional] |
9
+ | **table** | **String** | The table related to the error, if applicable | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'manticore/client'
15
+
16
+ instance = Manticore::Client::ResponseErrorDetails.new(
17
+ type: null,
18
+ reason: null,
19
+ table: null
20
+ )
21
+ ```
22
+
data/docs/SearchApi.md ADDED
@@ -0,0 +1,204 @@
1
+ # Manticore::Client::SearchApi
2
+
3
+ All URIs are relative to *http://127.0.0.1:9308*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**autocomplete**](SearchApi.md#autocomplete) | **POST** /autocomplete | Performs an autocomplete search on a table |
8
+ | [**percolate**](SearchApi.md#percolate) | **POST** /pq/{table}/search | Perform reverse search on a percolate table |
9
+ | [**search**](SearchApi.md#search) | **POST** /search | Performs a search on a table |
10
+
11
+
12
+ ## autocomplete
13
+
14
+ > Array&lt;Object&gt; autocomplete(autocomplete_request)
15
+
16
+ Performs an autocomplete search on a table
17
+
18
+ The method expects an object with the following mandatory properties: * the name of the table to search * the query string to autocomplete For details, see the documentation on [**Autocomplete**](Autocomplete.md) An example: ``` { \"table\":\"table_name\", \"query\":\"query_beginning\" } ``` An example of the method's response: ``` [ { \"total\": 3, \"error\": \"\", \"warning\": \"\", \"columns\": [ { \"query\": { \"type\": \"string\" } } ], \"data\": [ { \"query\": \"hello\" }, { \"query\": \"helio\" }, { \"query\": \"hell\" } ] } ] ``` For more detailed information about the autocomplete queries, please refer to the documentation [here](https://manual.manticoresearch.com/Searching/Autocomplete).
19
+
20
+ ### Examples
21
+
22
+ ```ruby
23
+ require 'time'
24
+ require 'manticore/client'
25
+
26
+ api_instance = Manticore::Client::SearchApi.new
27
+ autocomplete_request = Manticore::Client::AutocompleteRequest.new({table: 'table_example', query: 'query_example'}) # AutocompleteRequest |
28
+
29
+ begin
30
+ # Performs an autocomplete search on a table
31
+ result = api_instance.autocomplete(autocomplete_request)
32
+ p result
33
+ rescue Manticore::Client::ApiError => e
34
+ puts "Error when calling SearchApi->autocomplete: #{e}"
35
+ end
36
+ ```
37
+
38
+ #### Using the autocomplete_with_http_info variant
39
+
40
+ This returns an Array which contains the response data, status code and headers.
41
+
42
+ > <Array(Array&lt;Object&gt;, Integer, Hash)> autocomplete_with_http_info(autocomplete_request)
43
+
44
+ ```ruby
45
+ begin
46
+ # Performs an autocomplete search on a table
47
+ data, status_code, headers = api_instance.autocomplete_with_http_info(autocomplete_request)
48
+ p status_code # => 2xx
49
+ p headers # => { ... }
50
+ p data # => Array&lt;Object&gt;
51
+ rescue Manticore::Client::ApiError => e
52
+ puts "Error when calling SearchApi->autocomplete_with_http_info: #{e}"
53
+ end
54
+ ```
55
+
56
+ ### Parameters
57
+
58
+ | Name | Type | Description | Notes |
59
+ | ---- | ---- | ----------- | ----- |
60
+ | **autocomplete_request** | [**AutocompleteRequest**](AutocompleteRequest.md) | | |
61
+
62
+ ### Return type
63
+
64
+ **Array&lt;Object&gt;**
65
+
66
+ ### Authorization
67
+
68
+ No authorization required
69
+
70
+ ### HTTP request headers
71
+
72
+ - **Content-Type**: application/json
73
+ - **Accept**: application/json
74
+
75
+
76
+ ## percolate
77
+
78
+ > <SearchResponse> percolate(table, percolate_request)
79
+
80
+ Perform reverse search on a percolate table
81
+
82
+ Performs a percolate search. This method must be used only on percolate tables. Expects two parameters: the table name and an object with array of documents to be tested. An example of the documents object: ``` { \"query\" { \"percolate\": { \"document\": { \"content\":\"sample content\" } } } } ``` Responds with an object with matched stored queries: ``` { 'timed_out':false, 'hits': { 'total':2, 'max_score':1, 'hits': [ { 'table':'idx_pq_1', '_type':'doc', '_id':'2', '_score':'1', '_source': { 'query': { 'match':{'title':'some'} } } }, { 'table':'idx_pq_1', '_type':'doc', '_id':'5', '_score':'1', '_source': { 'query': { 'ql':'some | none' } } } ] } } ```
83
+
84
+ ### Examples
85
+
86
+ ```ruby
87
+ require 'time'
88
+ require 'manticore/client'
89
+
90
+ api_instance = Manticore::Client::SearchApi.new
91
+ table = 'table_example' # String | Name of the percolate table
92
+ percolate_request = Manticore::Client::PercolateRequest.new({query: Manticore::Client::PercolateRequestQuery.new({percolate: 3.56})}) # PercolateRequest |
93
+
94
+ begin
95
+ # Perform reverse search on a percolate table
96
+ result = api_instance.percolate(table, percolate_request)
97
+ p result
98
+ rescue Manticore::Client::ApiError => e
99
+ puts "Error when calling SearchApi->percolate: #{e}"
100
+ end
101
+ ```
102
+
103
+ #### Using the percolate_with_http_info variant
104
+
105
+ This returns an Array which contains the response data, status code and headers.
106
+
107
+ > <Array(<SearchResponse>, Integer, Hash)> percolate_with_http_info(table, percolate_request)
108
+
109
+ ```ruby
110
+ begin
111
+ # Perform reverse search on a percolate table
112
+ data, status_code, headers = api_instance.percolate_with_http_info(table, percolate_request)
113
+ p status_code # => 2xx
114
+ p headers # => { ... }
115
+ p data # => <SearchResponse>
116
+ rescue Manticore::Client::ApiError => e
117
+ puts "Error when calling SearchApi->percolate_with_http_info: #{e}"
118
+ end
119
+ ```
120
+
121
+ ### Parameters
122
+
123
+ | Name | Type | Description | Notes |
124
+ | ---- | ---- | ----------- | ----- |
125
+ | **table** | **String** | Name of the percolate table | |
126
+ | **percolate_request** | [**PercolateRequest**](PercolateRequest.md) | | |
127
+
128
+ ### Return type
129
+
130
+ [**SearchResponse**](SearchResponse.md)
131
+
132
+ ### Authorization
133
+
134
+ No authorization required
135
+
136
+ ### HTTP request headers
137
+
138
+ - **Content-Type**: application/json
139
+ - **Accept**: application/json
140
+
141
+
142
+ ## search
143
+
144
+ > <SearchResponse> search(search_request)
145
+
146
+ Performs a search on a table
147
+
148
+ The method expects an object with the following mandatory properties: * the name of the table to search * the match query object For details, see the documentation on [**SearchRequest**](SearchRequest.md) The method returns an object with the following properties: - took: the time taken to execute the search query. - timed_out: a boolean indicating whether the query timed out. - hits: an object with the following properties: - total: the total number of hits found. - hits: an array of hit objects, where each hit object represents a matched document. Each hit object has the following properties: - _id: the ID of the matched document. - _score: the score of the matched document. - _source: the source data of the matched document. In addition, if profiling is enabled, the response will include an additional array with profiling information attached. Also, if pagination is enabled, the response will include an additional 'scroll' property with a scroll token to use for pagination Here is an example search response: ``` { 'took':10, 'timed_out':false, 'hits': { 'total':2, 'hits': [ {'_id':'1','_score':1,'_source':{'gid':11}}, {'_id':'2','_score':1,'_source':{'gid':12}} ] } } ``` For more information about the match query syntax and additional parameters that can be added to request and response, please see the documentation [here](https://manual.manticoresearch.com/Searching/Full_text_matching/Basic_usage#HTTP-JSON).
149
+
150
+ ### Examples
151
+
152
+ ```ruby
153
+ require 'time'
154
+ require 'manticore/client'
155
+
156
+ api_instance = Manticore::Client::SearchApi.new
157
+ search_request = Manticore::Client::SearchRequest.new({table: 'table_example'}) # SearchRequest |
158
+
159
+ begin
160
+ # Performs a search on a table
161
+ result = api_instance.search(search_request)
162
+ p result
163
+ rescue Manticore::Client::ApiError => e
164
+ puts "Error when calling SearchApi->search: #{e}"
165
+ end
166
+ ```
167
+
168
+ #### Using the search_with_http_info variant
169
+
170
+ This returns an Array which contains the response data, status code and headers.
171
+
172
+ > <Array(<SearchResponse>, Integer, Hash)> search_with_http_info(search_request)
173
+
174
+ ```ruby
175
+ begin
176
+ # Performs a search on a table
177
+ data, status_code, headers = api_instance.search_with_http_info(search_request)
178
+ p status_code # => 2xx
179
+ p headers # => { ... }
180
+ p data # => <SearchResponse>
181
+ rescue Manticore::Client::ApiError => e
182
+ puts "Error when calling SearchApi->search_with_http_info: #{e}"
183
+ end
184
+ ```
185
+
186
+ ### Parameters
187
+
188
+ | Name | Type | Description | Notes |
189
+ | ---- | ---- | ----------- | ----- |
190
+ | **search_request** | [**SearchRequest**](SearchRequest.md) | | |
191
+
192
+ ### Return type
193
+
194
+ [**SearchResponse**](SearchResponse.md)
195
+
196
+ ### Authorization
197
+
198
+ No authorization required
199
+
200
+ ### HTTP request headers
201
+
202
+ - **Content-Type**: application/json
203
+ - **Accept**: application/json
204
+
@@ -0,0 +1,36 @@
1
+ # Manticore::Client::SearchQuery
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **query_string** | **String** | Filter object defining a query string | [optional] |
8
+ | **match** | **Object** | Filter object defining a match keyword passed as a string or in a Match object | [optional] |
9
+ | **match_phrase** | **Object** | Filter object defining a match phrase | [optional] |
10
+ | **match_all** | **Object** | Filter object to select all documents | [optional] |
11
+ | **bool** | [**BoolFilter**](BoolFilter.md) | | [optional] |
12
+ | **equals** | **Object** | | [optional] |
13
+ | **_in** | **Object** | Filter to match a given set of attribute values. | [optional] |
14
+ | **range** | **Object** | Filter to match a given range of attribute values passed in Range objects | [optional] |
15
+ | **geo_distance** | [**GeoDistance**](GeoDistance.md) | | [optional] |
16
+ | **highlight** | [**Highlight**](Highlight.md) | | [optional] |
17
+
18
+ ## Example
19
+
20
+ ```ruby
21
+ require 'manticore/client'
22
+
23
+ instance = Manticore::Client::SearchQuery.new(
24
+ query_string: null,
25
+ match: null,
26
+ match_phrase: null,
27
+ match_all: null,
28
+ bool: null,
29
+ equals: null,
30
+ _in: null,
31
+ range: null,
32
+ geo_distance: null,
33
+ highlight: null
34
+ )
35
+ ```
36
+
@@ -0,0 +1,46 @@
1
+ # Manticore::Client::SearchRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **table** | **String** | The table to perform the search on | |
8
+ | **query** | [**SearchQuery**](SearchQuery.md) | | [optional] |
9
+ | **join** | [**Array&lt;Join&gt;**](Join.md) | Join clause to combine search data from multiple tables | [optional] |
10
+ | **highlight** | [**Highlight**](Highlight.md) | | [optional] |
11
+ | **limit** | **Integer** | Maximum number of results to return | [optional] |
12
+ | **knn** | [**KnnQuery**](KnnQuery.md) | | [optional] |
13
+ | **aggs** | [**Hash&lt;String, Aggregation&gt;**](Aggregation.md) | Defines aggregation settings for grouping results | [optional] |
14
+ | **expressions** | **Hash&lt;String, String&gt;** | Expressions to calculate additional values for the result | [optional] |
15
+ | **max_matches** | **Integer** | Maximum number of matches allowed in the result | [optional] |
16
+ | **offset** | **Integer** | Starting point for pagination of the result | [optional] |
17
+ | **options** | **Object** | Additional search options | [optional] |
18
+ | **profile** | **Boolean** | Enable or disable profiling of the search request | [optional] |
19
+ | **sort** | **Object** | | [optional] |
20
+ | **_source** | **Object** | | [optional] |
21
+ | **track_scores** | **Boolean** | Enable or disable result weight calculation used for sorting | [optional] |
22
+
23
+ ## Example
24
+
25
+ ```ruby
26
+ require 'manticore/client'
27
+
28
+ instance = Manticore::Client::SearchRequest.new(
29
+ table: null,
30
+ query: null,
31
+ join: null,
32
+ highlight: null,
33
+ limit: null,
34
+ knn: null,
35
+ aggs: {agg1&#x3D;{terms&#x3D;{field&#x3D;field1, size&#x3D;1000, sort&#x3D;[{field1&#x3D;null, order&#x3D;asc}]}}},
36
+ expressions: {title_len&#x3D;crc32(title)},
37
+ max_matches: null,
38
+ offset: null,
39
+ options: null,
40
+ profile: null,
41
+ sort: null,
42
+ _source: null,
43
+ track_scores: null
44
+ )
45
+ ```
46
+
@@ -0,0 +1,30 @@
1
+ # Manticore::Client::SearchResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **took** | **Integer** | Time taken to execute the search | [optional] |
8
+ | **timed_out** | **Boolean** | Indicates whether the search operation timed out | [optional] |
9
+ | **aggregations** | **Object** | Aggregated search results grouped by the specified criteria | [optional] |
10
+ | **hits** | [**SearchResponseHits**](SearchResponseHits.md) | | [optional] |
11
+ | **profile** | **Object** | Profile information about the search execution, if profiling is enabled | [optional] |
12
+ | **scroll** | **String** | Scroll token to be used fo pagination | [optional] |
13
+ | **warning** | **Object** | Warnings encountered during the search operation | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'manticore/client'
19
+
20
+ instance = Manticore::Client::SearchResponse.new(
21
+ took: null,
22
+ timed_out: null,
23
+ aggregations: null,
24
+ hits: null,
25
+ profile: null,
26
+ scroll: null,
27
+ warning: null
28
+ )
29
+ ```
30
+
@@ -0,0 +1,24 @@
1
+ # Manticore::Client::SearchResponseHits
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **max_score** | **Integer** | Maximum score among the matched documents | [optional] |
8
+ | **total** | **Integer** | Total number of matched documents | [optional] |
9
+ | **total_relation** | **String** | Indicates whether the total number of hits is accurate or an estimate | [optional] |
10
+ | **hits** | [**Array&lt;HitsHits&gt;**](HitsHits.md) | Array of hit objects, each representing a matched document | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'manticore/client'
16
+
17
+ instance = Manticore::Client::SearchResponseHits.new(
18
+ max_score: null,
19
+ total: null,
20
+ total_relation: null,
21
+ hits: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,20 @@
1
+ # Manticore::Client::SourceRules
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **includes** | **Array&lt;String&gt;** | List of fields to include in the response | [optional] |
8
+ | **excludes** | **Array&lt;String&gt;** | List of fields to exclude from the response | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'manticore/client'
14
+
15
+ instance = Manticore::Client::SourceRules.new(
16
+ includes: null,
17
+ excludes: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,49 @@
1
+ # Manticore::Client::SqlResponse
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'manticore/client'
13
+
14
+ Manticore::Client::SqlResponse.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'Array<Object>',
18
+ # :'Object'
19
+ # ]
20
+ ```
21
+
22
+ ### build
23
+
24
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
25
+
26
+ #### Example
27
+
28
+ ```ruby
29
+ require 'manticore/client'
30
+
31
+ Manticore::Client::SqlResponse.build(data)
32
+ # => #<Array<Object>:0x00007fdd4aab02a0>
33
+
34
+ Manticore::Client::SqlResponse.build(data_that_doesnt_match)
35
+ # => nil
36
+ ```
37
+
38
+ #### Parameters
39
+
40
+ | Name | Type | Description |
41
+ | ---- | ---- | ----------- |
42
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
43
+
44
+ #### Return type
45
+
46
+ - `Array<Object>`
47
+ - `Object`
48
+ - `nil` (if no type matches)
49
+
@@ -0,0 +1,28 @@
1
+ # Manticore::Client::SuccessResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **table** | **String** | Name of the document table | [optional] |
8
+ | **id** | **Integer** | ID of the document affected by the request operation | [optional] |
9
+ | **created** | **Boolean** | Indicates whether the document was created as a result of the operation | [optional] |
10
+ | **result** | **String** | Result of the operation, typically &#39;created&#39;, &#39;updated&#39;, or &#39;deleted&#39; | [optional] |
11
+ | **found** | **Boolean** | Indicates whether the document was found in the table | [optional] |
12
+ | **status** | **Integer** | HTTP status code representing the result of the operation | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'manticore/client'
18
+
19
+ instance = Manticore::Client::SuccessResponse.new(
20
+ table: null,
21
+ id: null,
22
+ created: null,
23
+ result: null,
24
+ found: null,
25
+ status: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,26 @@
1
+ # Manticore::Client::UpdateDocumentRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **table** | **String** | Name of the document table | |
8
+ | **cluster** | **String** | Name of the document cluster | [optional] |
9
+ | **doc** | **Object** | Object containing the document fields to update | |
10
+ | **id** | **Integer** | Document ID | [optional] |
11
+ | **query** | [**QueryFilter**](QueryFilter.md) | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'manticore/client'
17
+
18
+ instance = Manticore::Client::UpdateDocumentRequest.new(
19
+ table: null,
20
+ cluster: null,
21
+ doc: {gid&#x3D;10},
22
+ id: null,
23
+ query: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,24 @@
1
+ # Manticore::Client::UpdateResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **table** | **String** | Name of the document table | [optional] |
8
+ | **updated** | **Integer** | Number of documents updated | [optional] |
9
+ | **id** | **Integer** | Document ID | [optional] |
10
+ | **result** | **String** | Result of the update operation, typically &#39;updated&#39; | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'manticore/client'
16
+
17
+ instance = Manticore::Client::UpdateResponse.new(
18
+ table: null,
19
+ updated: null,
20
+ id: null,
21
+ result: null
22
+ )
23
+ ```
24
+
data/docs/UtilsApi.md ADDED
@@ -0,0 +1,76 @@
1
+ # Manticore::Client::UtilsApi
2
+
3
+ All URIs are relative to *http://127.0.0.1:9308*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**sql**](UtilsApi.md#sql) | **POST** /sql | Perform SQL requests |
8
+
9
+
10
+ ## sql
11
+
12
+ > <SqlResponse> sql(body, opts)
13
+
14
+ Perform SQL requests
15
+
16
+ Run a query in SQL format. Expects a query string passed through `body` parameter and optional `raw_response` parameter that defines a format of response. `raw_response` can be set to `False` for Select queries only, e.g., `SELECT * FROM mytable` The query string must stay as it is, no URL encoding is needed. The response object depends on the query executed. In select mode the response has same format as `/search` operation.
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'manticore/client'
23
+
24
+ api_instance = Manticore::Client::UtilsApi.new
25
+ body = 'SHOW TABLES' # String | A query parameter string.
26
+ opts = {
27
+ raw_response: true # Boolean | Optional parameter, defines a format of response. Can be set to `False` for Select only queries and set to `True` for any type of queries. Default value is 'True'.
28
+ }
29
+
30
+ begin
31
+ # Perform SQL requests
32
+ result = api_instance.sql(body, opts)
33
+ p result
34
+ rescue Manticore::Client::ApiError => e
35
+ puts "Error when calling UtilsApi->sql: #{e}"
36
+ end
37
+ ```
38
+
39
+ #### Using the sql_with_http_info variant
40
+
41
+ This returns an Array which contains the response data, status code and headers.
42
+
43
+ > <Array(<SqlResponse>, Integer, Hash)> sql_with_http_info(body, opts)
44
+
45
+ ```ruby
46
+ begin
47
+ # Perform SQL requests
48
+ data, status_code, headers = api_instance.sql_with_http_info(body, opts)
49
+ p status_code # => 2xx
50
+ p headers # => { ... }
51
+ p data # => <SqlResponse>
52
+ rescue Manticore::Client::ApiError => e
53
+ puts "Error when calling UtilsApi->sql_with_http_info: #{e}"
54
+ end
55
+ ```
56
+
57
+ ### Parameters
58
+
59
+ | Name | Type | Description | Notes |
60
+ | ---- | ---- | ----------- | ----- |
61
+ | **body** | **String** | A query parameter string. | |
62
+ | **raw_response** | **Boolean** | Optional parameter, defines a format of response. Can be set to &#x60;False&#x60; for Select only queries and set to &#x60;True&#x60; for any type of queries. Default value is &#39;True&#39;. | [optional][default to true] |
63
+
64
+ ### Return type
65
+
66
+ [**SqlResponse**](SqlResponse.md)
67
+
68
+ ### Authorization
69
+
70
+ No authorization required
71
+
72
+ ### HTTP request headers
73
+
74
+ - **Content-Type**: text/plain
75
+ - **Accept**: application/json
76
+