Class: IndexeaClient::IndicesApi
- Inherits:
-
Object
- Object
- IndexeaClient::IndicesApi
- Defined in:
- lib/indexea_client/api/indices_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#index_cleanup(app, index, vcode, opts = {}) ⇒ Object
清空索引记录.
-
#index_cleanup_with_http_info(app, index, vcode, opts = {}) ⇒ Array<(Object, Integer, Hash)>
清空索引记录.
-
#index_copy_to(app, index, name, fields, queries, records, opts = {}) ⇒ IndexBean
导出索引数据.
-
#index_copy_to_with_http_info(app, index, name, fields, queries, records, opts = {}) ⇒ Array<(IndexBean, Integer, Hash)>
导出索引数据.
-
#index_create(body, app, opts = {}) ⇒ IndexBean
创建索引.
-
#index_create_template(body, opts = {}) ⇒ IndexTemplate
创建索引模板.
-
#index_create_template_with_http_info(body, opts = {}) ⇒ Array<(IndexTemplate, Integer, Hash)>
创建索引模板.
-
#index_create_with_http_info(body, app, opts = {}) ⇒ Array<(IndexBean, Integer, Hash)>
创建索引.
-
#index_delete(app, index, opts = {}) ⇒ BOOLEAN
删除索引.
-
#index_delete_crawler_task(app, index, opts = {}) ⇒ BOOLEAN
删除索引的数据爬取任务.
-
#index_delete_crawler_task_with_http_info(app, index, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
删除索引的数据爬取任务.
-
#index_delete_template(id, opts = {}) ⇒ BOOLEAN
删除索引模板.
-
#index_delete_template_with_http_info(id, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
删除索引模板.
-
#index_delete_with_http_info(app, index, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
删除索引.
-
#index_export(app, index, format, opts = {}) ⇒ BOOLEAN
导出索引数据.
-
#index_export_with_http_info(app, index, format, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
导出索引数据.
-
#index_flush(app, index, opts = {}) ⇒ BOOLEAN
刷新索引数据,主要用于将内存中的索引数据写入磁盘.
-
#index_flush_settings(type, app, index, opts = {}) ⇒ Object
写入设置信息到索引.
-
#index_flush_settings_with_http_info(type, app, index, opts = {}) ⇒ Array<(Object, Integer, Hash)>
写入设置信息到索引.
-
#index_flush_with_http_info(app, index, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
刷新索引数据,主要用于将内存中的索引数据写入磁盘.
-
#index_get(app, index, opts = {}) ⇒ IndexBean
获取单个索引详情.
-
#index_get_crawler_logs(app, index, from, size, opts = {}) ⇒ CrawlerLogs
获取索引的爬虫任务的爬取日志.
-
#index_get_crawler_logs_with_http_info(app, index, from, size, opts = {}) ⇒ Array<(CrawlerLogs, Integer, Hash)>
获取索引的爬虫任务的爬取日志.
-
#index_get_crawler_task(app, index, opts = {}) ⇒ CrawlerTask
获取索引的爬虫任务设定.
-
#index_get_crawler_task_with_http_info(app, index, opts = {}) ⇒ Array<(CrawlerTask, Integer, Hash)>
获取索引的爬虫任务设定.
-
#index_get_filter_settings(app, index, type, opts = {}) ⇒ Array<String>
获取索引设置信息.
-
#index_get_filter_settings_with_http_info(app, index, type, opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>
获取索引设置信息.
-
#index_get_settings(app, index, type, opts = {}) ⇒ IndexSettings
获取索引设置信息.
-
#index_get_settings_with_http_info(app, index, type, opts = {}) ⇒ Array<(IndexSettings, Integer, Hash)>
获取索引设置信息.
-
#index_get_with_http_info(app, index, opts = {}) ⇒ Array<(IndexBean, Integer, Hash)>
获取单个索引详情.
-
#index_list(app, opts = {}) ⇒ Array<IndexBean>
获取应用的索引列表.
-
#index_list_templates(from, size, opts = {}) ⇒ IndexTemplates
获取所有可用的索引模板.
-
#index_list_templates_with_http_info(from, size, opts = {}) ⇒ Array<(IndexTemplates, Integer, Hash)>
获取所有可用的索引模板.
-
#index_list_with_http_info(app, opts = {}) ⇒ Array<(Array<IndexBean>, Integer, Hash)>
获取应用的索引列表.
-
#index_prefetch(type, url, opts = {}) ⇒ Array<Object>
获取目标网站内容预览.
-
#index_prefetch_with_http_info(type, url, opts = {}) ⇒ Array<(Array<Object>, Integer, Hash)>
获取目标网站内容预览.
-
#index_rebuild(body, app, index, opts = {}) ⇒ IndexTask
重建索引数据.
-
#index_rebuild_task(app, index, task_id, opts = {}) ⇒ IndexTask
获取重建索引任务的详情.
-
#index_rebuild_task_with_http_info(app, index, task_id, opts = {}) ⇒ Array<(IndexTask, Integer, Hash)>
获取重建索引任务的详情.
-
#index_rebuild_with_http_info(body, app, index, opts = {}) ⇒ Array<(IndexTask, Integer, Hash)>
重建索引数据.
-
#index_submit_crawler_task(body, app, index, opts = {}) ⇒ CrawlerTask
提交或者更新索引的数据爬取任务.
-
#index_submit_crawler_task_with_http_info(body, app, index, opts = {}) ⇒ Array<(CrawlerTask, Integer, Hash)>
提交或者更新索引的数据爬取任务.
-
#index_update(body, app, index, opts = {}) ⇒ IndexBean
修改索引.
-
#index_update_settings(type, app, index, opts = {}) ⇒ BOOLEAN
更新索引设置信息.
-
#index_update_settings_with_http_info(type, app, index, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
更新索引设置信息.
-
#index_update_template(body, opts = {}) ⇒ IndexTemplate
修改索引模板.
-
#index_update_template_with_http_info(body, opts = {}) ⇒ Array<(IndexTemplate, Integer, Hash)>
修改索引模板.
-
#index_update_with_http_info(body, app, index, opts = {}) ⇒ Array<(IndexBean, Integer, Hash)>
修改索引.
-
#initialize(api_client = ApiClient.default) ⇒ IndicesApi
constructor
A new instance of IndicesApi.
-
#synonyms_add(body, app, index, opts = {}) ⇒ SynonymsBean
添加同义词.
-
#synonyms_add_with_http_info(body, app, index, opts = {}) ⇒ Array<(SynonymsBean, Integer, Hash)>
添加同义词.
-
#synonyms_delete(app, index, id, opts = {}) ⇒ BOOLEAN
删除同义词.
-
#synonyms_delete_with_http_info(app, index, id, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
删除同义词.
-
#synonyms_enable(app, index, id, opts = {}) ⇒ BOOLEAN
启用禁用同义词.
-
#synonyms_enable_with_http_info(app, index, id, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
启用禁用同义词.
-
#synonyms_flush(app, index, opts = {}) ⇒ Object
将同义词更新到搜索引擎的同义词表.
-
#synonyms_flush_with_http_info(app, index, opts = {}) ⇒ Array<(Object, Integer, Hash)>
将同义词更新到搜索引擎的同义词表.
-
#synonyms_import(body, action, app, index, opts = {}) ⇒ Array<SynonymsBean>
导入同义词.
-
#synonyms_import_with_http_info(body, action, app, index, opts = {}) ⇒ Array<(Array<SynonymsBean>, Integer, Hash)>
导入同义词.
-
#synonyms_list(app, index, size, opts = {}) ⇒ Array<SynonymsBean>
获取索引的所有同义词.
-
#synonyms_list_with_http_info(app, index, size, opts = {}) ⇒ Array<(Array<SynonymsBean>, Integer, Hash)>
获取索引的所有同义词.
-
#synonyms_update(body, app, index, opts = {}) ⇒ SynonymsBean
修改同义词.
-
#synonyms_update_with_http_info(body, app, index, opts = {}) ⇒ Array<(SynonymsBean, Integer, Hash)>
修改同义词.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ IndicesApi
Returns a new instance of IndicesApi.
16 17 18 |
# File 'lib/indexea_client/api/indices_api.rb', line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
14 15 16 |
# File 'lib/indexea_client/api/indices_api.rb', line 14 def api_client @api_client end |
Instance Method Details
#index_cleanup(app, index, vcode, opts = {}) ⇒ Object
清空索引记录
25 26 27 28 |
# File 'lib/indexea_client/api/indices_api.rb', line 25 def index_cleanup(app, index, vcode, opts = {}) data, _status_code, _headers = index_cleanup_with_http_info(app, index, vcode, opts) data end |
#index_cleanup_with_http_info(app, index, vcode, opts = {}) ⇒ Array<(Object, Integer, Hash)>
清空索引记录
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/indexea_client/api/indices_api.rb', line 36 def index_cleanup_with_http_info(app, index, vcode, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_cleanup ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_cleanup" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.index_cleanup" end # verify the required parameter 'vcode' is set if @api_client.config.client_side_validation && vcode.nil? fail ArgumentError, "Missing the required parameter 'vcode' when calling IndicesApi.index_cleanup" end # resource path local_var_path = '/indices/{app}/{index}/cleanup'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'vcode'] = vcode # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'Object' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_cleanup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_copy_to(app, index, name, fields, queries, records, opts = {}) ⇒ IndexBean
导出索引数据
95 96 97 98 |
# File 'lib/indexea_client/api/indices_api.rb', line 95 def index_copy_to(app, index, name, fields, queries, records, opts = {}) data, _status_code, _headers = index_copy_to_with_http_info(app, index, name, fields, queries, records, opts) data end |
#index_copy_to_with_http_info(app, index, name, fields, queries, records, opts = {}) ⇒ Array<(IndexBean, Integer, Hash)>
导出索引数据
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/indexea_client/api/indices_api.rb', line 109 def index_copy_to_with_http_info(app, index, name, fields, queries, records, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_copy_to ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_copy_to" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.index_copy_to" end # verify the required parameter 'name' is set if @api_client.config.client_side_validation && name.nil? fail ArgumentError, "Missing the required parameter 'name' when calling IndicesApi.index_copy_to" end # verify the required parameter 'fields' is set if @api_client.config.client_side_validation && fields.nil? fail ArgumentError, "Missing the required parameter 'fields' when calling IndicesApi.index_copy_to" end # verify the required parameter 'queries' is set if @api_client.config.client_side_validation && queries.nil? fail ArgumentError, "Missing the required parameter 'queries' when calling IndicesApi.index_copy_to" end # verify the required parameter 'records' is set if @api_client.config.client_side_validation && records.nil? fail ArgumentError, "Missing the required parameter 'records' when calling IndicesApi.index_copy_to" end # resource path local_var_path = '/indices/{app}/{index}/copyto'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'name'] = name query_params[:'fields'] = fields query_params[:'queries'] = queries query_params[:'records'] = records # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'IndexBean' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_copy_to\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_create(body, app, opts = {}) ⇒ IndexBean
创建索引
179 180 181 182 |
# File 'lib/indexea_client/api/indices_api.rb', line 179 def index_create(body, app, opts = {}) data, _status_code, _headers = index_create_with_http_info(body, app, opts) data end |
#index_create_template(body, opts = {}) ⇒ IndexTemplate
创建索引模板
240 241 242 243 |
# File 'lib/indexea_client/api/indices_api.rb', line 240 def index_create_template(body, opts = {}) data, _status_code, _headers = index_create_template_with_http_info(body, opts) data end |
#index_create_template_with_http_info(body, opts = {}) ⇒ Array<(IndexTemplate, Integer, Hash)>
创建索引模板
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/indexea_client/api/indices_api.rb', line 249 def index_create_template_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_create_template ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling IndicesApi.index_create_template" end # resource path local_var_path = '/indices/templates' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'IndexTemplate' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_create_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_create_with_http_info(body, app, opts = {}) ⇒ Array<(IndexBean, Integer, Hash)>
创建索引
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/indexea_client/api/indices_api.rb', line 189 def index_create_with_http_info(body, app, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_create ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling IndicesApi.index_create" end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_create" end # resource path local_var_path = '/indices/{app}'.sub('{' + 'app' + '}', app.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'IndexBean' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_delete(app, index, opts = {}) ⇒ BOOLEAN
删除索引
298 299 300 301 |
# File 'lib/indexea_client/api/indices_api.rb', line 298 def index_delete(app, index, opts = {}) data, _status_code, _headers = index_delete_with_http_info(app, index, opts) data end |
#index_delete_crawler_task(app, index, opts = {}) ⇒ BOOLEAN
删除索引的数据爬取任务
362 363 364 365 |
# File 'lib/indexea_client/api/indices_api.rb', line 362 def index_delete_crawler_task(app, index, opts = {}) data, _status_code, _headers = index_delete_crawler_task_with_http_info(app, index, opts) data end |
#index_delete_crawler_task_with_http_info(app, index, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
删除索引的数据爬取任务
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 |
# File 'lib/indexea_client/api/indices_api.rb', line 372 def index_delete_crawler_task_with_http_info(app, index, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_delete_crawler_task ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_delete_crawler_task" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.index_delete_crawler_task" end # resource path local_var_path = '/indices/{app}/{index}/crawler-settings'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'BOOLEAN' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_delete_crawler_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_delete_template(id, opts = {}) ⇒ BOOLEAN
删除索引模板
421 422 423 424 |
# File 'lib/indexea_client/api/indices_api.rb', line 421 def index_delete_template(id, opts = {}) data, _status_code, _headers = index_delete_template_with_http_info(id, opts) data end |
#index_delete_template_with_http_info(id, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
删除索引模板
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 |
# File 'lib/indexea_client/api/indices_api.rb', line 430 def index_delete_template_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_delete_template ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling IndicesApi.index_delete_template" end # resource path local_var_path = '/indices/templates' # query parameters query_params = opts[:query_params] || {} query_params[:'id'] = id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'BOOLEAN' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_delete_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_delete_with_http_info(app, index, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
删除索引
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 |
# File 'lib/indexea_client/api/indices_api.rb', line 309 def index_delete_with_http_info(app, index, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_delete ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_delete" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.index_delete" end # resource path local_var_path = '/indices/{app}/{index}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) # form parameters form_params = opts[:form_params] || {} form_params['vcode'] = opts[:'vcode'] if !opts[:'vcode'].nil? # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'BOOLEAN' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_export(app, index, format, opts = {}) ⇒ BOOLEAN
导出索引数据
478 479 480 481 |
# File 'lib/indexea_client/api/indices_api.rb', line 478 def index_export(app, index, format, opts = {}) data, _status_code, _headers = index_export_with_http_info(app, index, format, opts) data end |
#index_export_with_http_info(app, index, format, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
导出索引数据
489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 |
# File 'lib/indexea_client/api/indices_api.rb', line 489 def index_export_with_http_info(app, index, format, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_export ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_export" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.index_export" end # verify the required parameter 'format' is set if @api_client.config.client_side_validation && format.nil? fail ArgumentError, "Missing the required parameter 'format' when calling IndicesApi.index_export" end # verify enum value if @api_client.config.client_side_validation && !['json', 'csv', 'excel'].include?(format) fail ArgumentError, "invalid value for 'format', must be one of json, csv, excel" end # resource path local_var_path = '/indices/{app}/{index}/export'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'format'] = format # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'BOOLEAN' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_flush(app, index, opts = {}) ⇒ BOOLEAN
刷新索引数据,主要用于将内存中的索引数据写入磁盘
548 549 550 551 |
# File 'lib/indexea_client/api/indices_api.rb', line 548 def index_flush(app, index, opts = {}) data, _status_code, _headers = index_flush_with_http_info(app, index, opts) data end |
#index_flush_settings(type, app, index, opts = {}) ⇒ Object
写入设置信息到索引
610 611 612 613 |
# File 'lib/indexea_client/api/indices_api.rb', line 610 def index_flush_settings(type, app, index, opts = {}) data, _status_code, _headers = index_flush_settings_with_http_info(type, app, index, opts) data end |
#index_flush_settings_with_http_info(type, app, index, opts = {}) ⇒ Array<(Object, Integer, Hash)>
写入设置信息到索引
622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 |
# File 'lib/indexea_client/api/indices_api.rb', line 622 def index_flush_settings_with_http_info(type, app, index, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_flush_settings ...' end # verify the required parameter 'type' is set if @api_client.config.client_side_validation && type.nil? fail ArgumentError, "Missing the required parameter 'type' when calling IndicesApi.index_flush_settings" end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_flush_settings" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.index_flush_settings" end # resource path local_var_path = '/indices/{app}/{index}/settings'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'type'] = type # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) # form parameters form_params = opts[:form_params] || {} form_params['password'] = opts[:'password'] if !opts[:'password'].nil? # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'Object' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_flush_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_flush_with_http_info(app, index, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
刷新索引数据,主要用于将内存中的索引数据写入磁盘
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 |
# File 'lib/indexea_client/api/indices_api.rb', line 558 def index_flush_with_http_info(app, index, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_flush ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_flush" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.index_flush" end # resource path local_var_path = '/indices/{app}/{index}/flush'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'BOOLEAN' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_flush\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_get(app, index, opts = {}) ⇒ IndexBean
获取单个索引详情
680 681 682 683 |
# File 'lib/indexea_client/api/indices_api.rb', line 680 def index_get(app, index, opts = {}) data, _status_code, _headers = index_get_with_http_info(app, index, opts) data end |
#index_get_crawler_logs(app, index, from, size, opts = {}) ⇒ CrawlerLogs
获取索引的爬虫任务的爬取日志
742 743 744 745 |
# File 'lib/indexea_client/api/indices_api.rb', line 742 def index_get_crawler_logs(app, index, from, size, opts = {}) data, _status_code, _headers = index_get_crawler_logs_with_http_info(app, index, from, size, opts) data end |
#index_get_crawler_logs_with_http_info(app, index, from, size, opts = {}) ⇒ Array<(CrawlerLogs, Integer, Hash)>
获取索引的爬虫任务的爬取日志
754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 |
# File 'lib/indexea_client/api/indices_api.rb', line 754 def index_get_crawler_logs_with_http_info(app, index, from, size, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_get_crawler_logs ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_get_crawler_logs" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.index_get_crawler_logs" end # verify the required parameter 'from' is set if @api_client.config.client_side_validation && from.nil? fail ArgumentError, "Missing the required parameter 'from' when calling IndicesApi.index_get_crawler_logs" end # verify the required parameter 'size' is set if @api_client.config.client_side_validation && size.nil? fail ArgumentError, "Missing the required parameter 'size' when calling IndicesApi.index_get_crawler_logs" end # resource path local_var_path = '/indices/{app}/{index}/crawler-logs'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'from'] = from query_params[:'size'] = size # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'CrawlerLogs' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_get_crawler_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_get_crawler_task(app, index, opts = {}) ⇒ CrawlerTask
获取索引的爬虫任务设定
814 815 816 817 |
# File 'lib/indexea_client/api/indices_api.rb', line 814 def index_get_crawler_task(app, index, opts = {}) data, _status_code, _headers = index_get_crawler_task_with_http_info(app, index, opts) data end |
#index_get_crawler_task_with_http_info(app, index, opts = {}) ⇒ Array<(CrawlerTask, Integer, Hash)>
获取索引的爬虫任务设定
824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 |
# File 'lib/indexea_client/api/indices_api.rb', line 824 def index_get_crawler_task_with_http_info(app, index, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_get_crawler_task ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_get_crawler_task" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.index_get_crawler_task" end # resource path local_var_path = '/indices/{app}/{index}/crawler-settings'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'CrawlerTask' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_get_crawler_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_get_filter_settings(app, index, type, opts = {}) ⇒ Array<String>
获取索引设置信息
875 876 877 878 |
# File 'lib/indexea_client/api/indices_api.rb', line 875 def index_get_filter_settings(app, index, type, opts = {}) data, _status_code, _headers = index_get_filter_settings_with_http_info(app, index, type, opts) data end |
#index_get_filter_settings_with_http_info(app, index, type, opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>
获取索引设置信息
886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 |
# File 'lib/indexea_client/api/indices_api.rb', line 886 def index_get_filter_settings_with_http_info(app, index, type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_get_filter_settings ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_get_filter_settings" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.index_get_filter_settings" end # verify the required parameter 'type' is set if @api_client.config.client_side_validation && type.nil? fail ArgumentError, "Missing the required parameter 'type' when calling IndicesApi.index_get_filter_settings" end # verify enum value if @api_client.config.client_side_validation && !['stopwords', 'synonyms'].include?(type) fail ArgumentError, "invalid value for 'type', must be one of stopwords, synonyms" end # resource path local_var_path = '/indices/{app}/{index}/filter-settings'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'type'] = type # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'Array<String>' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_get_filter_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_get_settings(app, index, type, opts = {}) ⇒ IndexSettings
获取索引设置信息
946 947 948 949 |
# File 'lib/indexea_client/api/indices_api.rb', line 946 def index_get_settings(app, index, type, opts = {}) data, _status_code, _headers = index_get_settings_with_http_info(app, index, type, opts) data end |
#index_get_settings_with_http_info(app, index, type, opts = {}) ⇒ Array<(IndexSettings, Integer, Hash)>
获取索引设置信息
957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 |
# File 'lib/indexea_client/api/indices_api.rb', line 957 def index_get_settings_with_http_info(app, index, type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_get_settings ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_get_settings" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.index_get_settings" end # verify the required parameter 'type' is set if @api_client.config.client_side_validation && type.nil? fail ArgumentError, "Missing the required parameter 'type' when calling IndicesApi.index_get_settings" end # resource path local_var_path = '/indices/{app}/{index}/settings'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'type'] = type # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'IndexSettings' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_get_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_get_with_http_info(app, index, opts = {}) ⇒ Array<(IndexBean, Integer, Hash)>
获取单个索引详情
690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 |
# File 'lib/indexea_client/api/indices_api.rb', line 690 def index_get_with_http_info(app, index, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_get ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_get" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.index_get" end # resource path local_var_path = '/indices/{app}/{index}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'IndexBean' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_list(app, opts = {}) ⇒ Array<IndexBean>
获取应用的索引列表
1012 1013 1014 1015 |
# File 'lib/indexea_client/api/indices_api.rb', line 1012 def index_list(app, opts = {}) data, _status_code, _headers = index_list_with_http_info(app, opts) data end |
#index_list_templates(from, size, opts = {}) ⇒ IndexTemplates
获取所有可用的索引模板
1069 1070 1071 1072 |
# File 'lib/indexea_client/api/indices_api.rb', line 1069 def index_list_templates(from, size, opts = {}) data, _status_code, _headers = index_list_templates_with_http_info(from, size, opts) data end |
#index_list_templates_with_http_info(from, size, opts = {}) ⇒ Array<(IndexTemplates, Integer, Hash)>
获取所有可用的索引模板
1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 |
# File 'lib/indexea_client/api/indices_api.rb', line 1079 def index_list_templates_with_http_info(from, size, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_list_templates ...' end # verify the required parameter 'from' is set if @api_client.config.client_side_validation && from.nil? fail ArgumentError, "Missing the required parameter 'from' when calling IndicesApi.index_list_templates" end # verify the required parameter 'size' is set if @api_client.config.client_side_validation && size.nil? fail ArgumentError, "Missing the required parameter 'size' when calling IndicesApi.index_list_templates" end # resource path local_var_path = '/indices/templates' # query parameters query_params = opts[:query_params] || {} query_params[:'from'] = from query_params[:'size'] = size # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'IndexTemplates' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_list_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_list_with_http_info(app, opts = {}) ⇒ Array<(Array<IndexBean>, Integer, Hash)>
获取应用的索引列表
1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 |
# File 'lib/indexea_client/api/indices_api.rb', line 1022 def index_list_with_http_info(app, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_list ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_list" end # resource path local_var_path = '/indices/{app}'.sub('{' + 'app' + '}', app.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'stat'] = opts[:'stat'] if !opts[:'stat'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'Array<IndexBean>' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_prefetch(type, url, opts = {}) ⇒ Array<Object>
获取目标网站内容预览
1131 1132 1133 1134 |
# File 'lib/indexea_client/api/indices_api.rb', line 1131 def index_prefetch(type, url, opts = {}) data, _status_code, _headers = index_prefetch_with_http_info(type, url, opts) data end |
#index_prefetch_with_http_info(type, url, opts = {}) ⇒ Array<(Array<Object>, Integer, Hash)>
获取目标网站内容预览
1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 |
# File 'lib/indexea_client/api/indices_api.rb', line 1141 def index_prefetch_with_http_info(type, url, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_prefetch ...' end # verify the required parameter 'type' is set if @api_client.config.client_side_validation && type.nil? fail ArgumentError, "Missing the required parameter 'type' when calling IndicesApi.index_prefetch" end # verify the required parameter 'url' is set if @api_client.config.client_side_validation && url.nil? fail ArgumentError, "Missing the required parameter 'url' when calling IndicesApi.index_prefetch" end # resource path local_var_path = '/indices/crawler' # query parameters query_params = opts[:query_params] || {} query_params[:'type'] = type query_params[:'url'] = url # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'Array<Object>' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_prefetch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_rebuild(body, app, index, opts = {}) ⇒ IndexTask
重建索引数据
1194 1195 1196 1197 |
# File 'lib/indexea_client/api/indices_api.rb', line 1194 def index_rebuild(body, app, index, opts = {}) data, _status_code, _headers = index_rebuild_with_http_info(body, app, index, opts) data end |
#index_rebuild_task(app, index, task_id, opts = {}) ⇒ IndexTask
获取重建索引任务的详情
1262 1263 1264 1265 |
# File 'lib/indexea_client/api/indices_api.rb', line 1262 def index_rebuild_task(app, index, task_id, opts = {}) data, _status_code, _headers = index_rebuild_task_with_http_info(app, index, task_id, opts) data end |
#index_rebuild_task_with_http_info(app, index, task_id, opts = {}) ⇒ Array<(IndexTask, Integer, Hash)>
获取重建索引任务的详情
1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 |
# File 'lib/indexea_client/api/indices_api.rb', line 1273 def index_rebuild_task_with_http_info(app, index, task_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_rebuild_task ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_rebuild_task" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.index_rebuild_task" end # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? fail ArgumentError, "Missing the required parameter 'task_id' when calling IndicesApi.index_rebuild_task" end # resource path local_var_path = '/indices/{app}/{index}/rebuild'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'task_id'] = task_id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'IndexTask' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_rebuild_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_rebuild_with_http_info(body, app, index, opts = {}) ⇒ Array<(IndexTask, Integer, Hash)>
重建索引数据
1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 |
# File 'lib/indexea_client/api/indices_api.rb', line 1205 def index_rebuild_with_http_info(body, app, index, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_rebuild ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling IndicesApi.index_rebuild" end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_rebuild" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.index_rebuild" end # resource path local_var_path = '/indices/{app}/{index}/rebuild'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'IndexTask' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_rebuild\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_submit_crawler_task(body, app, index, opts = {}) ⇒ CrawlerTask
提交或者更新索引的数据爬取任务
1329 1330 1331 1332 |
# File 'lib/indexea_client/api/indices_api.rb', line 1329 def index_submit_crawler_task(body, app, index, opts = {}) data, _status_code, _headers = index_submit_crawler_task_with_http_info(body, app, index, opts) data end |
#index_submit_crawler_task_with_http_info(body, app, index, opts = {}) ⇒ Array<(CrawlerTask, Integer, Hash)>
提交或者更新索引的数据爬取任务
1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 |
# File 'lib/indexea_client/api/indices_api.rb', line 1340 def index_submit_crawler_task_with_http_info(body, app, index, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_submit_crawler_task ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling IndicesApi.index_submit_crawler_task" end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_submit_crawler_task" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.index_submit_crawler_task" end # resource path local_var_path = '/indices/{app}/{index}/crawler-settings'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'CrawlerTask' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_submit_crawler_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_update(body, app, index, opts = {}) ⇒ IndexBean
修改索引
1397 1398 1399 1400 |
# File 'lib/indexea_client/api/indices_api.rb', line 1397 def index_update(body, app, index, opts = {}) data, _status_code, _headers = index_update_with_http_info(body, app, index, opts) data end |
#index_update_settings(type, app, index, opts = {}) ⇒ BOOLEAN
更新索引设置信息
1466 1467 1468 1469 |
# File 'lib/indexea_client/api/indices_api.rb', line 1466 def index_update_settings(type, app, index, opts = {}) data, _status_code, _headers = index_update_settings_with_http_info(type, app, index, opts) data end |
#index_update_settings_with_http_info(type, app, index, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
更新索引设置信息
1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 |
# File 'lib/indexea_client/api/indices_api.rb', line 1478 def index_update_settings_with_http_info(type, app, index, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_update_settings ...' end # verify the required parameter 'type' is set if @api_client.config.client_side_validation && type.nil? fail ArgumentError, "Missing the required parameter 'type' when calling IndicesApi.index_update_settings" end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_update_settings" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.index_update_settings" end # resource path local_var_path = '/indices/{app}/{index}/settings'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'type'] = type # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['text/plain']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) return_type = opts[:return_type] || 'BOOLEAN' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_update_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_update_template(body, opts = {}) ⇒ IndexTemplate
修改索引模板
1534 1535 1536 1537 |
# File 'lib/indexea_client/api/indices_api.rb', line 1534 def index_update_template(body, opts = {}) data, _status_code, _headers = index_update_template_with_http_info(body, opts) data end |
#index_update_template_with_http_info(body, opts = {}) ⇒ Array<(IndexTemplate, Integer, Hash)>
修改索引模板
1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 |
# File 'lib/indexea_client/api/indices_api.rb', line 1543 def index_update_template_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_update_template ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling IndicesApi.index_update_template" end # resource path local_var_path = '/indices/templates' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'IndexTemplate' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_update_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#index_update_with_http_info(body, app, index, opts = {}) ⇒ Array<(IndexBean, Integer, Hash)>
修改索引
1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 |
# File 'lib/indexea_client/api/indices_api.rb', line 1408 def index_update_with_http_info(body, app, index, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.index_update ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling IndicesApi.index_update" end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.index_update" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.index_update" end # resource path local_var_path = '/indices/{app}/{index}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'IndexBean' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#index_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#synonyms_add(body, app, index, opts = {}) ⇒ SynonymsBean
添加同义词
1592 1593 1594 1595 |
# File 'lib/indexea_client/api/indices_api.rb', line 1592 def synonyms_add(body, app, index, opts = {}) data, _status_code, _headers = synonyms_add_with_http_info(body, app, index, opts) data end |
#synonyms_add_with_http_info(body, app, index, opts = {}) ⇒ Array<(SynonymsBean, Integer, Hash)>
添加同义词
1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 |
# File 'lib/indexea_client/api/indices_api.rb', line 1603 def synonyms_add_with_http_info(body, app, index, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.synonyms_add ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling IndicesApi.synonyms_add" end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.synonyms_add" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.synonyms_add" end # resource path local_var_path = '/indices/{app}/{index}/synonyms'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'SynonymsBean' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#synonyms_add\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#synonyms_delete(app, index, id, opts = {}) ⇒ BOOLEAN
删除同义词
1660 1661 1662 1663 |
# File 'lib/indexea_client/api/indices_api.rb', line 1660 def synonyms_delete(app, index, id, opts = {}) data, _status_code, _headers = synonyms_delete_with_http_info(app, index, id, opts) data end |
#synonyms_delete_with_http_info(app, index, id, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
删除同义词
1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 |
# File 'lib/indexea_client/api/indices_api.rb', line 1671 def synonyms_delete_with_http_info(app, index, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.synonyms_delete ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.synonyms_delete" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.synonyms_delete" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling IndicesApi.synonyms_delete" end # resource path local_var_path = '/indices/{app}/{index}/synonyms'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'id'] = id # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'BOOLEAN' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#synonyms_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#synonyms_enable(app, index, id, opts = {}) ⇒ BOOLEAN
启用禁用同义词
1729 1730 1731 1732 |
# File 'lib/indexea_client/api/indices_api.rb', line 1729 def synonyms_enable(app, index, id, opts = {}) data, _status_code, _headers = synonyms_enable_with_http_info(app, index, id, opts) data end |
#synonyms_enable_with_http_info(app, index, id, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
启用禁用同义词
1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 |
# File 'lib/indexea_client/api/indices_api.rb', line 1742 def synonyms_enable_with_http_info(app, index, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.synonyms_enable ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.synonyms_enable" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.synonyms_enable" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling IndicesApi.synonyms_enable" end # resource path local_var_path = '/indices/{app}/{index}/synonyms'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'id'] = id query_params[:'enable'] = opts[:'enable'] if !opts[:'enable'].nil? query_params[:'all'] = opts[:'all'] if !opts[:'all'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'BOOLEAN' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#synonyms_enable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#synonyms_flush(app, index, opts = {}) ⇒ Object
将同义词更新到搜索引擎的同义词表
1800 1801 1802 1803 |
# File 'lib/indexea_client/api/indices_api.rb', line 1800 def synonyms_flush(app, index, opts = {}) data, _status_code, _headers = synonyms_flush_with_http_info(app, index, opts) data end |
#synonyms_flush_with_http_info(app, index, opts = {}) ⇒ Array<(Object, Integer, Hash)>
将同义词更新到搜索引擎的同义词表
1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 |
# File 'lib/indexea_client/api/indices_api.rb', line 1811 def synonyms_flush_with_http_info(app, index, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.synonyms_flush ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.synonyms_flush" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.synonyms_flush" end # resource path local_var_path = '/indices/{app}/{index}/synonyms-flush'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) # form parameters form_params = opts[:form_params] || {} form_params['password'] = opts[:'password'] if !opts[:'password'].nil? # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'Object' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#synonyms_flush\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#synonyms_import(body, action, app, index, opts = {}) ⇒ Array<SynonymsBean>
导入同义词
1866 1867 1868 1869 |
# File 'lib/indexea_client/api/indices_api.rb', line 1866 def synonyms_import(body, action, app, index, opts = {}) data, _status_code, _headers = synonyms_import_with_http_info(body, action, app, index, opts) data end |
#synonyms_import_with_http_info(body, action, app, index, opts = {}) ⇒ Array<(Array<SynonymsBean>, Integer, Hash)>
导入同义词
1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 |
# File 'lib/indexea_client/api/indices_api.rb', line 1878 def synonyms_import_with_http_info(body, action, app, index, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.synonyms_import ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling IndicesApi.synonyms_import" end # verify the required parameter 'action' is set if @api_client.config.client_side_validation && action.nil? fail ArgumentError, "Missing the required parameter 'action' when calling IndicesApi.synonyms_import" end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.synonyms_import" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.synonyms_import" end # resource path local_var_path = '/indices/{app}/{index}/synonyms-import'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'action'] = action # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'Array<SynonymsBean>' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#synonyms_import\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#synonyms_list(app, index, size, opts = {}) ⇒ Array<SynonymsBean>
获取索引的所有同义词
1942 1943 1944 1945 |
# File 'lib/indexea_client/api/indices_api.rb', line 1942 def synonyms_list(app, index, size, opts = {}) data, _status_code, _headers = synonyms_list_with_http_info(app, index, size, opts) data end |
#synonyms_list_with_http_info(app, index, size, opts = {}) ⇒ Array<(Array<SynonymsBean>, Integer, Hash)>
获取索引的所有同义词
1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 |
# File 'lib/indexea_client/api/indices_api.rb', line 1955 def synonyms_list_with_http_info(app, index, size, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.synonyms_list ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.synonyms_list" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.synonyms_list" end # verify the required parameter 'size' is set if @api_client.config.client_side_validation && size.nil? fail ArgumentError, "Missing the required parameter 'size' when calling IndicesApi.synonyms_list" end # resource path local_var_path = '/indices/{app}/{index}/synonyms'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'size'] = size query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'Array<SynonymsBean>' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#synonyms_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#synonyms_update(body, app, index, opts = {}) ⇒ SynonymsBean
修改同义词
2013 2014 2015 2016 |
# File 'lib/indexea_client/api/indices_api.rb', line 2013 def synonyms_update(body, app, index, opts = {}) data, _status_code, _headers = synonyms_update_with_http_info(body, app, index, opts) data end |
#synonyms_update_with_http_info(body, app, index, opts = {}) ⇒ Array<(SynonymsBean, Integer, Hash)>
修改同义词
2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 |
# File 'lib/indexea_client/api/indices_api.rb', line 2024 def synonyms_update_with_http_info(body, app, index, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: IndicesApi.synonyms_update ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling IndicesApi.synonyms_update" end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling IndicesApi.synonyms_update" end # verify the required parameter 'index' is set if @api_client.config.client_side_validation && index.nil? fail ArgumentError, "Missing the required parameter 'index' when calling IndicesApi.synonyms_update" end # resource path local_var_path = '/indices/{app}/{index}/synonyms'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'index' + '}', index.to_s) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'SynonymsBean' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: IndicesApi#synonyms_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |