indexea_client 0.0.9
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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +3413 -0
- data/Rakefile +8 -0
- data/docs/AccountApi.md +685 -0
- data/docs/AccountBean.md +27 -0
- data/docs/AccountPasswdBody.md +8 -0
- data/docs/AccountPortraitBody.md +7 -0
- data/docs/AccountProfileBody.md +8 -0
- data/docs/AccountResetpwdBody.md +9 -0
- data/docs/AccountSigninBody.md +9 -0
- data/docs/AccountSignupBody.md +10 -0
- data/docs/AccountsFeedbackBody.md +8 -0
- data/docs/AccountsMessageBody.md +8 -0
- data/docs/AnalyzeObject.md +8 -0
- data/docs/AnalyzeToken.md +11 -0
- data/docs/AppBean.md +23 -0
- data/docs/AppCompanyBody.md +22 -0
- data/docs/AppIndexBody.md +7 -0
- data/docs/AppLogAccount.md +9 -0
- data/docs/AppLogBean.md +19 -0
- data/docs/AppLogsBean.md +9 -0
- data/docs/AppMentorBean.md +14 -0
- data/docs/AppOauthBody.md +7 -0
- data/docs/AppOauthBody1.md +7 -0
- data/docs/AppOauthresetsecretBody.md +7 -0
- data/docs/AppTokensBody.md +7 -0
- data/docs/AppTokensBody1.md +7 -0
- data/docs/AppWidgetBody.md +7 -0
- data/docs/AppsApi.md +1843 -0
- data/docs/AppsAppBody.md +8 -0
- data/docs/AppsBody.md +8 -0
- data/docs/AutoCompleteItem.md +9 -0
- data/docs/BlacklistBean.md +12 -0
- data/docs/Bulletin.md +15 -0
- data/docs/CompanyBean.md +24 -0
- data/docs/ContactForm.md +11 -0
- data/docs/CrawlerLog.md +14 -0
- data/docs/CrawlerLogs.md +8 -0
- data/docs/CrawlerTask.md +16 -0
- data/docs/FieldsApi.md +215 -0
- data/docs/GlobalApi.md +258 -0
- data/docs/GlobalOptionForm.md +8 -0
- data/docs/IndexBean.md +26 -0
- data/docs/IndexFieldBean.md +8 -0
- data/docs/IndexForm.md +15 -0
- data/docs/IndexRebuildForm.md +12 -0
- data/docs/IndexSettings.md +10 -0
- data/docs/IndexSettingsBody.md +7 -0
- data/docs/IndexStatBean.md +14 -0
- data/docs/IndexSynonymsflushBody.md +7 -0
- data/docs/IndexTask.md +13 -0
- data/docs/IndexTemplate.md +17 -0
- data/docs/IndexTemplates.md +8 -0
- data/docs/IndexUploadBody.md +7 -0
- data/docs/IndicesApi.md +1620 -0
- data/docs/IntelligentMapping.md +8 -0
- data/docs/KeywordBindingBean.md +14 -0
- data/docs/MentorForm.md +8 -0
- data/docs/Message.md +18 -0
- data/docs/MessageApi.md +262 -0
- data/docs/Messages.md +8 -0
- data/docs/OauthAppBean.md +20 -0
- data/docs/OpenidBean.md +10 -0
- data/docs/OptionForm.md +10 -0
- data/docs/OrdersIdentBody.md +7 -0
- data/docs/PayResult.md +9 -0
- data/docs/PaymentApi.md +788 -0
- data/docs/PaymentInvoice.md +15 -0
- data/docs/PaymentOrder.md +25 -0
- data/docs/PaymentRecord.md +13 -0
- data/docs/PaymentService.md +12 -0
- data/docs/QueriesApi.md +1821 -0
- data/docs/QueryActionBean.md +27 -0
- data/docs/QueryBean.md +22 -0
- data/docs/QueryForm.md +15 -0
- data/docs/QueryNode.md +10 -0
- data/docs/QuerySortField.md +9 -0
- data/docs/QueryVariableBean.md +17 -0
- data/docs/RecommendApi.md +365 -0
- data/docs/RecommendBean.md +18 -0
- data/docs/RecordFilter.md +10 -0
- data/docs/RecordsApi.md +286 -0
- data/docs/SearchApi.md +646 -0
- data/docs/SearchEstimateResult.md +11 -0
- data/docs/SearchWord.md +8 -0
- data/docs/StatIndexBean.md +14 -0
- data/docs/StatsApi.md +245 -0
- data/docs/SynonymsBean.md +14 -0
- data/docs/TokenBean.md +12 -0
- data/docs/TriggerBean.md +13 -0
- data/docs/TriggerLogBean.md +15 -0
- data/docs/ValueOfField.md +8 -0
- data/docs/WidgetBean.md +21 -0
- data/docs/WidgetForm.md +13 -0
- data/docs/WidgetLogo.md +7 -0
- data/docs/WidgetLogoBody.md +7 -0
- data/docs/WidgetStatusForm.md +8 -0
- data/docs/WidgetsApi.md +573 -0
- data/git_push.sh +55 -0
- data/indexea_client.gemspec +38 -0
- data/lib/indexea_client/api/account_api.rb +846 -0
- data/lib/indexea_client/api/apps_api.rb +2271 -0
- data/lib/indexea_client/api/fields_api.rb +289 -0
- data/lib/indexea_client/api/global_api.rb +326 -0
- data/lib/indexea_client/api/indices_api.rb +2076 -0
- data/lib/indexea_client/api/message_api.rb +337 -0
- data/lib/indexea_client/api/payment_api.rb +975 -0
- data/lib/indexea_client/api/queries_api.rb +2320 -0
- data/lib/indexea_client/api/recommend_api.rb +461 -0
- data/lib/indexea_client/api/records_api.rb +375 -0
- data/lib/indexea_client/api/search_api.rb +892 -0
- data/lib/indexea_client/api/stats_api.rb +312 -0
- data/lib/indexea_client/api/widgets_api.rb +741 -0
- data/lib/indexea_client/api_client.rb +391 -0
- data/lib/indexea_client/api_error.rb +57 -0
- data/lib/indexea_client/configuration.rb +205 -0
- data/lib/indexea_client/models/account_bean.rb +396 -0
- data/lib/indexea_client/models/account_passwd_body.rb +227 -0
- data/lib/indexea_client/models/account_portrait_body.rb +206 -0
- data/lib/indexea_client/models/account_profile_body.rb +228 -0
- data/lib/indexea_client/models/account_resetpwd_body.rb +240 -0
- data/lib/indexea_client/models/account_signin_body.rb +237 -0
- data/lib/indexea_client/models/account_signup_body.rb +254 -0
- data/lib/indexea_client/models/accounts_feedback_body.rb +262 -0
- data/lib/indexea_client/models/accounts_message_body.rb +226 -0
- data/lib/indexea_client/models/analyze_object.rb +216 -0
- data/lib/indexea_client/models/analyze_token.rb +243 -0
- data/lib/indexea_client/models/app_bean.rb +360 -0
- data/lib/indexea_client/models/app_company_body.rb +357 -0
- data/lib/indexea_client/models/app_index_body.rb +212 -0
- data/lib/indexea_client/models/app_log_account.rb +224 -0
- data/lib/indexea_client/models/app_log_bean.rb +318 -0
- data/lib/indexea_client/models/app_logs_bean.rb +229 -0
- data/lib/indexea_client/models/app_mentor_bean.rb +277 -0
- data/lib/indexea_client/models/app_oauth_body.rb +206 -0
- data/lib/indexea_client/models/app_oauth_body_1.rb +212 -0
- data/lib/indexea_client/models/app_oauthresetsecret_body.rb +212 -0
- data/lib/indexea_client/models/app_tokens_body.rb +212 -0
- data/lib/indexea_client/models/app_tokens_body_1.rb +212 -0
- data/lib/indexea_client/models/app_widget_body.rb +212 -0
- data/lib/indexea_client/models/apps_app_body.rb +216 -0
- data/lib/indexea_client/models/apps_body.rb +221 -0
- data/lib/indexea_client/models/auto_complete_item.rb +224 -0
- data/lib/indexea_client/models/blacklist_bean.rb +258 -0
- data/lib/indexea_client/models/bulletin.rb +312 -0
- data/lib/indexea_client/models/company_bean.rb +378 -0
- data/lib/indexea_client/models/contact_form.rb +258 -0
- data/lib/indexea_client/models/crawler_log.rb +270 -0
- data/lib/indexea_client/models/crawler_logs.rb +217 -0
- data/lib/indexea_client/models/crawler_task.rb +288 -0
- data/lib/indexea_client/models/global_option_form.rb +218 -0
- data/lib/indexea_client/models/index_bean.rb +390 -0
- data/lib/indexea_client/models/index_field_bean.rb +217 -0
- data/lib/indexea_client/models/index_form.rb +283 -0
- data/lib/indexea_client/models/index_rebuild_form.rb +254 -0
- data/lib/indexea_client/models/index_settings.rb +234 -0
- data/lib/indexea_client/models/index_settings_body.rb +212 -0
- data/lib/indexea_client/models/index_stat_bean.rb +270 -0
- data/lib/indexea_client/models/index_synonymsflush_body.rb +212 -0
- data/lib/indexea_client/models/index_task.rb +261 -0
- data/lib/indexea_client/models/index_template.rb +299 -0
- data/lib/indexea_client/models/index_templates.rb +219 -0
- data/lib/indexea_client/models/index_upload_body.rb +208 -0
- data/lib/indexea_client/models/intelligent_mapping.rb +217 -0
- data/lib/indexea_client/models/keyword_binding_bean.rb +274 -0
- data/lib/indexea_client/models/mentor_form.rb +220 -0
- data/lib/indexea_client/models/message.rb +306 -0
- data/lib/indexea_client/models/messages.rb +217 -0
- data/lib/indexea_client/models/oauth_app_bean.rb +329 -0
- data/lib/indexea_client/models/openid_bean.rb +238 -0
- data/lib/indexea_client/models/option_form.rb +287 -0
- data/lib/indexea_client/models/orders_ident_body.rb +206 -0
- data/lib/indexea_client/models/pay_result.rb +258 -0
- data/lib/indexea_client/models/payment_invoice.rb +283 -0
- data/lib/indexea_client/models/payment_order.rb +412 -0
- data/lib/indexea_client/models/payment_record.rb +261 -0
- data/lib/indexea_client/models/payment_service.rb +258 -0
- data/lib/indexea_client/models/query_action_bean.rb +391 -0
- data/lib/indexea_client/models/query_bean.rb +348 -0
- data/lib/indexea_client/models/query_form.rb +285 -0
- data/lib/indexea_client/models/query_node.rb +234 -0
- data/lib/indexea_client/models/query_sort_field.rb +264 -0
- data/lib/indexea_client/models/query_variable_bean.rb +335 -0
- data/lib/indexea_client/models/recommend_bean.rb +318 -0
- data/lib/indexea_client/models/record_filter.rb +242 -0
- data/lib/indexea_client/models/search_estimate_result.rb +242 -0
- data/lib/indexea_client/models/search_word.rb +218 -0
- data/lib/indexea_client/models/stat_index_bean.rb +270 -0
- data/lib/indexea_client/models/synonyms_bean.rb +274 -0
- data/lib/indexea_client/models/token_bean.rb +252 -0
- data/lib/indexea_client/models/trigger_bean.rb +263 -0
- data/lib/indexea_client/models/trigger_log_bean.rb +279 -0
- data/lib/indexea_client/models/value_of_field.rb +217 -0
- data/lib/indexea_client/models/widget_bean.rb +387 -0
- data/lib/indexea_client/models/widget_form.rb +328 -0
- data/lib/indexea_client/models/widget_logo.rb +206 -0
- data/lib/indexea_client/models/widget_logo_body.rb +206 -0
- data/lib/indexea_client/models/widget_status_form.rb +223 -0
- data/lib/indexea_client/version.rb +14 -0
- data/lib/indexea_client.rb +133 -0
- data/spec/api/account_api_spec.rb +200 -0
- data/spec/api/apps_api_spec.rb +492 -0
- data/spec/api/fields_api_spec.rb +86 -0
- data/spec/api/global_api_spec.rb +98 -0
- data/spec/api/indices_api_spec.rb +434 -0
- data/spec/api/message_api_spec.rb +96 -0
- data/spec/api/payment_api_spec.rb +227 -0
- data/spec/api/queries_api_spec.rb +482 -0
- data/spec/api/recommend_api_spec.rb +125 -0
- data/spec/api/records_api_spec.rb +107 -0
- data/spec/api/search_api_spec.rb +220 -0
- data/spec/api/stats_api_spec.rb +99 -0
- data/spec/api/widgets_api_spec.rb +174 -0
- data/spec/api_client_spec.rb +225 -0
- data/spec/base_object_spec.rb +109 -0
- data/spec/configuration_spec.rb +41 -0
- data/spec/models/account_bean_spec.rb +160 -0
- data/spec/models/account_passwd_body_spec.rb +46 -0
- data/spec/models/account_portrait_body_spec.rb +40 -0
- data/spec/models/account_profile_body_spec.rb +46 -0
- data/spec/models/account_resetpwd_body_spec.rb +52 -0
- data/spec/models/account_signin_body_spec.rb +52 -0
- data/spec/models/account_signup_body_spec.rb +58 -0
- data/spec/models/accounts_feedback_body_spec.rb +50 -0
- data/spec/models/accounts_message_body_spec.rb +46 -0
- data/spec/models/analyze_object_spec.rb +46 -0
- data/spec/models/analyze_token_spec.rb +64 -0
- data/spec/models/app_bean_spec.rb +136 -0
- data/spec/models/app_company_body_spec.rb +130 -0
- data/spec/models/app_index_body_spec.rb +40 -0
- data/spec/models/app_log_account_spec.rb +52 -0
- data/spec/models/app_log_bean_spec.rb +112 -0
- data/spec/models/app_logs_bean_spec.rb +52 -0
- data/spec/models/app_mentor_bean_spec.rb +82 -0
- data/spec/models/app_oauth_body_1_spec.rb +40 -0
- data/spec/models/app_oauth_body_spec.rb +40 -0
- data/spec/models/app_oauthresetsecret_body_spec.rb +40 -0
- data/spec/models/app_tokens_body_1_spec.rb +40 -0
- data/spec/models/app_tokens_body_spec.rb +40 -0
- data/spec/models/app_widget_body_spec.rb +40 -0
- data/spec/models/apps_app_body_spec.rb +46 -0
- data/spec/models/apps_body_spec.rb +46 -0
- data/spec/models/auto_complete_item_spec.rb +52 -0
- data/spec/models/blacklist_bean_spec.rb +70 -0
- data/spec/models/bulletin_spec.rb +92 -0
- data/spec/models/company_bean_spec.rb +142 -0
- data/spec/models/contact_form_spec.rb +64 -0
- data/spec/models/crawler_log_spec.rb +82 -0
- data/spec/models/crawler_logs_spec.rb +46 -0
- data/spec/models/crawler_task_spec.rb +94 -0
- data/spec/models/global_option_form_spec.rb +46 -0
- data/spec/models/index_bean_spec.rb +154 -0
- data/spec/models/index_field_bean_spec.rb +46 -0
- data/spec/models/index_form_spec.rb +88 -0
- data/spec/models/index_rebuild_form_spec.rb +70 -0
- data/spec/models/index_settings_body_spec.rb +40 -0
- data/spec/models/index_settings_spec.rb +58 -0
- data/spec/models/index_stat_bean_spec.rb +82 -0
- data/spec/models/index_synonymsflush_body_spec.rb +40 -0
- data/spec/models/index_task_spec.rb +76 -0
- data/spec/models/index_template_spec.rb +100 -0
- data/spec/models/index_templates_spec.rb +46 -0
- data/spec/models/index_upload_body_spec.rb +40 -0
- data/spec/models/intelligent_mapping_spec.rb +46 -0
- data/spec/models/keyword_binding_bean_spec.rb +82 -0
- data/spec/models/mentor_form_spec.rb +46 -0
- data/spec/models/message_spec.rb +106 -0
- data/spec/models/messages_spec.rb +46 -0
- data/spec/models/oauth_app_bean_spec.rb +118 -0
- data/spec/models/openid_bean_spec.rb +58 -0
- data/spec/models/option_form_spec.rb +62 -0
- data/spec/models/orders_ident_body_spec.rb +40 -0
- data/spec/models/pay_result_spec.rb +56 -0
- data/spec/models/payment_invoice_spec.rb +88 -0
- data/spec/models/payment_order_spec.rb +152 -0
- data/spec/models/payment_record_spec.rb +76 -0
- data/spec/models/payment_service_spec.rb +70 -0
- data/spec/models/query_action_bean_spec.rb +160 -0
- data/spec/models/query_bean_spec.rb +130 -0
- data/spec/models/query_form_spec.rb +88 -0
- data/spec/models/query_node_spec.rb +58 -0
- data/spec/models/query_sort_field_spec.rb +56 -0
- data/spec/models/query_variable_bean_spec.rb +104 -0
- data/spec/models/recommend_bean_spec.rb +106 -0
- data/spec/models/record_filter_spec.rb +58 -0
- data/spec/models/search_estimate_result_spec.rb +64 -0
- data/spec/models/search_word_spec.rb +46 -0
- data/spec/models/stat_index_bean_spec.rb +82 -0
- data/spec/models/synonyms_bean_spec.rb +82 -0
- data/spec/models/token_bean_spec.rb +70 -0
- data/spec/models/trigger_bean_spec.rb +76 -0
- data/spec/models/trigger_log_bean_spec.rb +88 -0
- data/spec/models/value_of_field_spec.rb +46 -0
- data/spec/models/widget_bean_spec.rb +132 -0
- data/spec/models/widget_form_spec.rb +84 -0
- data/spec/models/widget_logo_body_spec.rb +40 -0
- data/spec/models/widget_logo_spec.rb +40 -0
- data/spec/models/widget_status_form_spec.rb +46 -0
- data/spec/spec_helper.rb +110 -0
- metadata +501 -0
@@ -0,0 +1,2320 @@
|
|
1
|
+
=begin
|
2
|
+
#Indexea OpenAPI
|
3
|
+
|
4
|
+
#OpenAPI of Indexea
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.0
|
7
|
+
Contact: indexea.com@gmail.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 3.0.54
|
10
|
+
=end
|
11
|
+
|
12
|
+
module IndexeaClient
|
13
|
+
class QueriesApi
|
14
|
+
attr_accessor :api_client
|
15
|
+
|
16
|
+
def initialize(api_client = ApiClient.default)
|
17
|
+
@api_client = api_client
|
18
|
+
end
|
19
|
+
# 分词测试
|
20
|
+
# @param body
|
21
|
+
# @param app 应用标识
|
22
|
+
# @param [Hash] opts the optional parameters
|
23
|
+
# @option opts [BigDecimal] :index 索引编号,如果指定索引编号则使用索引的分词器 (default to 0)
|
24
|
+
# @return [Array<AnalyzeToken>]
|
25
|
+
def query_analyze(body, app, opts = {})
|
26
|
+
data, _status_code, _headers = query_analyze_with_http_info(body, app, opts)
|
27
|
+
data
|
28
|
+
end
|
29
|
+
|
30
|
+
# 分词测试
|
31
|
+
# @param body
|
32
|
+
# @param app 应用标识
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @option opts [BigDecimal] :index 索引编号,如果指定索引编号则使用索引的分词器
|
35
|
+
# @return [Array<(Array<AnalyzeToken>, Integer, Hash)>] Array<AnalyzeToken> data, response status code and response headers
|
36
|
+
def query_analyze_with_http_info(body, app, opts = {})
|
37
|
+
if @api_client.config.debugging
|
38
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_analyze ...'
|
39
|
+
end
|
40
|
+
# verify the required parameter 'body' is set
|
41
|
+
if @api_client.config.client_side_validation && body.nil?
|
42
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling QueriesApi.query_analyze"
|
43
|
+
end
|
44
|
+
# verify the required parameter 'app' is set
|
45
|
+
if @api_client.config.client_side_validation && app.nil?
|
46
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_analyze"
|
47
|
+
end
|
48
|
+
# resource path
|
49
|
+
local_var_path = '/queries/{app}/analyze'.sub('{' + 'app' + '}', app.to_s)
|
50
|
+
|
51
|
+
# query parameters
|
52
|
+
query_params = opts[:query_params] || {}
|
53
|
+
query_params[:'index'] = opts[:'index'] if !opts[:'index'].nil?
|
54
|
+
|
55
|
+
# header parameters
|
56
|
+
header_params = opts[:header_params] || {}
|
57
|
+
# HTTP header 'Accept' (if needed)
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
59
|
+
# HTTP header 'Content-Type'
|
60
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
61
|
+
|
62
|
+
# form parameters
|
63
|
+
form_params = opts[:form_params] || {}
|
64
|
+
|
65
|
+
# http body (model)
|
66
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
67
|
+
|
68
|
+
return_type = opts[:return_type] || 'Array<AnalyzeToken>'
|
69
|
+
|
70
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
71
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
72
|
+
:header_params => header_params,
|
73
|
+
:query_params => query_params,
|
74
|
+
:form_params => form_params,
|
75
|
+
:body => post_body,
|
76
|
+
:auth_names => auth_names,
|
77
|
+
:return_type => return_type)
|
78
|
+
|
79
|
+
if @api_client.config.debugging
|
80
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_analyze\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
81
|
+
end
|
82
|
+
return data, status_code, headers
|
83
|
+
end
|
84
|
+
# 复制指定查询并创建新查询
|
85
|
+
# @param app 应用标识
|
86
|
+
# @param query 源查询编号
|
87
|
+
# @param [Hash] opts the optional parameters
|
88
|
+
# @return [QueryBean]
|
89
|
+
def query_copy(app, query, opts = {})
|
90
|
+
data, _status_code, _headers = query_copy_with_http_info(app, query, opts)
|
91
|
+
data
|
92
|
+
end
|
93
|
+
|
94
|
+
# 复制指定查询并创建新查询
|
95
|
+
# @param app 应用标识
|
96
|
+
# @param query 源查询编号
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @return [Array<(QueryBean, Integer, Hash)>] QueryBean data, response status code and response headers
|
99
|
+
def query_copy_with_http_info(app, query, opts = {})
|
100
|
+
if @api_client.config.debugging
|
101
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_copy ...'
|
102
|
+
end
|
103
|
+
# verify the required parameter 'app' is set
|
104
|
+
if @api_client.config.client_side_validation && app.nil?
|
105
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_copy"
|
106
|
+
end
|
107
|
+
# verify the required parameter 'query' is set
|
108
|
+
if @api_client.config.client_side_validation && query.nil?
|
109
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_copy"
|
110
|
+
end
|
111
|
+
# resource path
|
112
|
+
local_var_path = '/queries/{app}/copy'.sub('{' + 'app' + '}', app.to_s)
|
113
|
+
|
114
|
+
# query parameters
|
115
|
+
query_params = opts[:query_params] || {}
|
116
|
+
query_params[:'query'] = query
|
117
|
+
|
118
|
+
# header parameters
|
119
|
+
header_params = opts[:header_params] || {}
|
120
|
+
# HTTP header 'Accept' (if needed)
|
121
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
122
|
+
|
123
|
+
# form parameters
|
124
|
+
form_params = opts[:form_params] || {}
|
125
|
+
|
126
|
+
# http body (model)
|
127
|
+
post_body = opts[:body]
|
128
|
+
|
129
|
+
return_type = opts[:return_type] || 'QueryBean'
|
130
|
+
|
131
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
132
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
133
|
+
:header_params => header_params,
|
134
|
+
:query_params => query_params,
|
135
|
+
:form_params => form_params,
|
136
|
+
:body => post_body,
|
137
|
+
:auth_names => auth_names,
|
138
|
+
:return_type => return_type)
|
139
|
+
|
140
|
+
if @api_client.config.debugging
|
141
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_copy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
142
|
+
end
|
143
|
+
return data, status_code, headers
|
144
|
+
end
|
145
|
+
# 复制查询到已有查询
|
146
|
+
# @param app 应用标识
|
147
|
+
# @param query 源查询编号
|
148
|
+
# @param to 目标查询编号
|
149
|
+
# @param [Hash] opts the optional parameters
|
150
|
+
# @return [BOOLEAN]
|
151
|
+
def query_copy_to_query(app, query, to, opts = {})
|
152
|
+
data, _status_code, _headers = query_copy_to_query_with_http_info(app, query, to, opts)
|
153
|
+
data
|
154
|
+
end
|
155
|
+
|
156
|
+
# 复制查询到已有查询
|
157
|
+
# @param app 应用标识
|
158
|
+
# @param query 源查询编号
|
159
|
+
# @param to 目标查询编号
|
160
|
+
# @param [Hash] opts the optional parameters
|
161
|
+
# @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
|
162
|
+
def query_copy_to_query_with_http_info(app, query, to, opts = {})
|
163
|
+
if @api_client.config.debugging
|
164
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_copy_to_query ...'
|
165
|
+
end
|
166
|
+
# verify the required parameter 'app' is set
|
167
|
+
if @api_client.config.client_side_validation && app.nil?
|
168
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_copy_to_query"
|
169
|
+
end
|
170
|
+
# verify the required parameter 'query' is set
|
171
|
+
if @api_client.config.client_side_validation && query.nil?
|
172
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_copy_to_query"
|
173
|
+
end
|
174
|
+
# verify the required parameter 'to' is set
|
175
|
+
if @api_client.config.client_side_validation && to.nil?
|
176
|
+
fail ArgumentError, "Missing the required parameter 'to' when calling QueriesApi.query_copy_to_query"
|
177
|
+
end
|
178
|
+
# resource path
|
179
|
+
local_var_path = '/queries/{app}/copy'.sub('{' + 'app' + '}', app.to_s)
|
180
|
+
|
181
|
+
# query parameters
|
182
|
+
query_params = opts[:query_params] || {}
|
183
|
+
query_params[:'query'] = query
|
184
|
+
query_params[:'to'] = to
|
185
|
+
|
186
|
+
# header parameters
|
187
|
+
header_params = opts[:header_params] || {}
|
188
|
+
# HTTP header 'Accept' (if needed)
|
189
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
190
|
+
|
191
|
+
# form parameters
|
192
|
+
form_params = opts[:form_params] || {}
|
193
|
+
|
194
|
+
# http body (model)
|
195
|
+
post_body = opts[:body]
|
196
|
+
|
197
|
+
return_type = opts[:return_type] || 'BOOLEAN'
|
198
|
+
|
199
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
200
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
201
|
+
:header_params => header_params,
|
202
|
+
:query_params => query_params,
|
203
|
+
:form_params => form_params,
|
204
|
+
:body => post_body,
|
205
|
+
:auth_names => auth_names,
|
206
|
+
:return_type => return_type)
|
207
|
+
|
208
|
+
if @api_client.config.debugging
|
209
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_copy_to_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
210
|
+
end
|
211
|
+
return data, status_code, headers
|
212
|
+
end
|
213
|
+
# 创建搜索
|
214
|
+
# @param body
|
215
|
+
# @param app 应用标识
|
216
|
+
# @param [Hash] opts the optional parameters
|
217
|
+
# @return [QueryBean]
|
218
|
+
def query_create(body, app, opts = {})
|
219
|
+
data, _status_code, _headers = query_create_with_http_info(body, app, opts)
|
220
|
+
data
|
221
|
+
end
|
222
|
+
|
223
|
+
# 创建搜索
|
224
|
+
# @param body
|
225
|
+
# @param app 应用标识
|
226
|
+
# @param [Hash] opts the optional parameters
|
227
|
+
# @return [Array<(QueryBean, Integer, Hash)>] QueryBean data, response status code and response headers
|
228
|
+
def query_create_with_http_info(body, app, opts = {})
|
229
|
+
if @api_client.config.debugging
|
230
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_create ...'
|
231
|
+
end
|
232
|
+
# verify the required parameter 'body' is set
|
233
|
+
if @api_client.config.client_side_validation && body.nil?
|
234
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling QueriesApi.query_create"
|
235
|
+
end
|
236
|
+
# verify the required parameter 'app' is set
|
237
|
+
if @api_client.config.client_side_validation && app.nil?
|
238
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_create"
|
239
|
+
end
|
240
|
+
# resource path
|
241
|
+
local_var_path = '/queries/{app}'.sub('{' + 'app' + '}', app.to_s)
|
242
|
+
|
243
|
+
# query parameters
|
244
|
+
query_params = opts[:query_params] || {}
|
245
|
+
|
246
|
+
# header parameters
|
247
|
+
header_params = opts[:header_params] || {}
|
248
|
+
# HTTP header 'Accept' (if needed)
|
249
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
250
|
+
# HTTP header 'Content-Type'
|
251
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
252
|
+
|
253
|
+
# form parameters
|
254
|
+
form_params = opts[:form_params] || {}
|
255
|
+
|
256
|
+
# http body (model)
|
257
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
258
|
+
|
259
|
+
return_type = opts[:return_type] || 'QueryBean'
|
260
|
+
|
261
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
262
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
263
|
+
:header_params => header_params,
|
264
|
+
:query_params => query_params,
|
265
|
+
:form_params => form_params,
|
266
|
+
:body => post_body,
|
267
|
+
:auth_names => auth_names,
|
268
|
+
:return_type => return_type)
|
269
|
+
|
270
|
+
if @api_client.config.debugging
|
271
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
272
|
+
end
|
273
|
+
return data, status_code, headers
|
274
|
+
end
|
275
|
+
# 创建新的关键词文档绑定
|
276
|
+
# @param body
|
277
|
+
# @param query 查询编号
|
278
|
+
# @param app 应用标识
|
279
|
+
# @param [Hash] opts the optional parameters
|
280
|
+
# @return [KeywordBindingBean]
|
281
|
+
def query_create_keyword_bindings(body, query, app, opts = {})
|
282
|
+
data, _status_code, _headers = query_create_keyword_bindings_with_http_info(body, query, app, opts)
|
283
|
+
data
|
284
|
+
end
|
285
|
+
|
286
|
+
# 创建新的关键词文档绑定
|
287
|
+
# @param body
|
288
|
+
# @param query 查询编号
|
289
|
+
# @param app 应用标识
|
290
|
+
# @param [Hash] opts the optional parameters
|
291
|
+
# @return [Array<(KeywordBindingBean, Integer, Hash)>] KeywordBindingBean data, response status code and response headers
|
292
|
+
def query_create_keyword_bindings_with_http_info(body, query, app, opts = {})
|
293
|
+
if @api_client.config.debugging
|
294
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_create_keyword_bindings ...'
|
295
|
+
end
|
296
|
+
# verify the required parameter 'body' is set
|
297
|
+
if @api_client.config.client_side_validation && body.nil?
|
298
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling QueriesApi.query_create_keyword_bindings"
|
299
|
+
end
|
300
|
+
# verify the required parameter 'query' is set
|
301
|
+
if @api_client.config.client_side_validation && query.nil?
|
302
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_create_keyword_bindings"
|
303
|
+
end
|
304
|
+
# verify the required parameter 'app' is set
|
305
|
+
if @api_client.config.client_side_validation && app.nil?
|
306
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_create_keyword_bindings"
|
307
|
+
end
|
308
|
+
# resource path
|
309
|
+
local_var_path = '/queries/{app}/keyword-bindings'.sub('{' + 'app' + '}', app.to_s)
|
310
|
+
|
311
|
+
# query parameters
|
312
|
+
query_params = opts[:query_params] || {}
|
313
|
+
query_params[:'query'] = query
|
314
|
+
|
315
|
+
# header parameters
|
316
|
+
header_params = opts[:header_params] || {}
|
317
|
+
# HTTP header 'Accept' (if needed)
|
318
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
319
|
+
# HTTP header 'Content-Type'
|
320
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
321
|
+
|
322
|
+
# form parameters
|
323
|
+
form_params = opts[:form_params] || {}
|
324
|
+
|
325
|
+
# http body (model)
|
326
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
327
|
+
|
328
|
+
return_type = opts[:return_type] || 'KeywordBindingBean'
|
329
|
+
|
330
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
331
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
332
|
+
:header_params => header_params,
|
333
|
+
:query_params => query_params,
|
334
|
+
:form_params => form_params,
|
335
|
+
:body => post_body,
|
336
|
+
:auth_names => auth_names,
|
337
|
+
:return_type => return_type)
|
338
|
+
|
339
|
+
if @api_client.config.debugging
|
340
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_create_keyword_bindings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
341
|
+
end
|
342
|
+
return data, status_code, headers
|
343
|
+
end
|
344
|
+
# 创建新的预定义查询变量
|
345
|
+
# @param body
|
346
|
+
# @param app 应用标识
|
347
|
+
# @param [Hash] opts the optional parameters
|
348
|
+
# @return [QueryVariableBean]
|
349
|
+
def query_create_variable(body, app, opts = {})
|
350
|
+
data, _status_code, _headers = query_create_variable_with_http_info(body, app, opts)
|
351
|
+
data
|
352
|
+
end
|
353
|
+
|
354
|
+
# 创建新的预定义查询变量
|
355
|
+
# @param body
|
356
|
+
# @param app 应用标识
|
357
|
+
# @param [Hash] opts the optional parameters
|
358
|
+
# @return [Array<(QueryVariableBean, Integer, Hash)>] QueryVariableBean data, response status code and response headers
|
359
|
+
def query_create_variable_with_http_info(body, app, opts = {})
|
360
|
+
if @api_client.config.debugging
|
361
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_create_variable ...'
|
362
|
+
end
|
363
|
+
# verify the required parameter 'body' is set
|
364
|
+
if @api_client.config.client_side_validation && body.nil?
|
365
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling QueriesApi.query_create_variable"
|
366
|
+
end
|
367
|
+
# verify the required parameter 'app' is set
|
368
|
+
if @api_client.config.client_side_validation && app.nil?
|
369
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_create_variable"
|
370
|
+
end
|
371
|
+
# resource path
|
372
|
+
local_var_path = '/queries/{app}/variables'.sub('{' + 'app' + '}', app.to_s)
|
373
|
+
|
374
|
+
# query parameters
|
375
|
+
query_params = opts[:query_params] || {}
|
376
|
+
|
377
|
+
# header parameters
|
378
|
+
header_params = opts[:header_params] || {}
|
379
|
+
# HTTP header 'Accept' (if needed)
|
380
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
381
|
+
# HTTP header 'Content-Type'
|
382
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
383
|
+
|
384
|
+
# form parameters
|
385
|
+
form_params = opts[:form_params] || {}
|
386
|
+
|
387
|
+
# http body (model)
|
388
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
389
|
+
|
390
|
+
return_type = opts[:return_type] || 'QueryVariableBean'
|
391
|
+
|
392
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
393
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
394
|
+
:header_params => header_params,
|
395
|
+
:query_params => query_params,
|
396
|
+
:form_params => form_params,
|
397
|
+
:body => post_body,
|
398
|
+
:auth_names => auth_names,
|
399
|
+
:return_type => return_type)
|
400
|
+
|
401
|
+
if @api_client.config.debugging
|
402
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_create_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
403
|
+
end
|
404
|
+
return data, status_code, headers
|
405
|
+
end
|
406
|
+
# 删除搜索
|
407
|
+
# @param app 应用标识
|
408
|
+
# @param query 查询编号
|
409
|
+
# @param [Hash] opts the optional parameters
|
410
|
+
# @return [BOOLEAN]
|
411
|
+
def query_delete(app, query, opts = {})
|
412
|
+
data, _status_code, _headers = query_delete_with_http_info(app, query, opts)
|
413
|
+
data
|
414
|
+
end
|
415
|
+
|
416
|
+
# 删除搜索
|
417
|
+
# @param app 应用标识
|
418
|
+
# @param query 查询编号
|
419
|
+
# @param [Hash] opts the optional parameters
|
420
|
+
# @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
|
421
|
+
def query_delete_with_http_info(app, query, opts = {})
|
422
|
+
if @api_client.config.debugging
|
423
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_delete ...'
|
424
|
+
end
|
425
|
+
# verify the required parameter 'app' is set
|
426
|
+
if @api_client.config.client_side_validation && app.nil?
|
427
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_delete"
|
428
|
+
end
|
429
|
+
# verify the required parameter 'query' is set
|
430
|
+
if @api_client.config.client_side_validation && query.nil?
|
431
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_delete"
|
432
|
+
end
|
433
|
+
# resource path
|
434
|
+
local_var_path = '/queries/{app}'.sub('{' + 'app' + '}', app.to_s)
|
435
|
+
|
436
|
+
# query parameters
|
437
|
+
query_params = opts[:query_params] || {}
|
438
|
+
query_params[:'query'] = query
|
439
|
+
|
440
|
+
# header parameters
|
441
|
+
header_params = opts[:header_params] || {}
|
442
|
+
# HTTP header 'Accept' (if needed)
|
443
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
444
|
+
|
445
|
+
# form parameters
|
446
|
+
form_params = opts[:form_params] || {}
|
447
|
+
|
448
|
+
# http body (model)
|
449
|
+
post_body = opts[:body]
|
450
|
+
|
451
|
+
return_type = opts[:return_type] || 'BOOLEAN'
|
452
|
+
|
453
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
454
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
455
|
+
:header_params => header_params,
|
456
|
+
:query_params => query_params,
|
457
|
+
:form_params => form_params,
|
458
|
+
:body => post_body,
|
459
|
+
:auth_names => auth_names,
|
460
|
+
:return_type => return_type)
|
461
|
+
|
462
|
+
if @api_client.config.debugging
|
463
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
464
|
+
end
|
465
|
+
return data, status_code, headers
|
466
|
+
end
|
467
|
+
# 删除关键词文档绑定
|
468
|
+
# @param app 应用标识
|
469
|
+
# @param query 查询编号
|
470
|
+
# @param id 关键词编号
|
471
|
+
# @param [Hash] opts the optional parameters
|
472
|
+
# @return [BOOLEAN]
|
473
|
+
def query_delete_keyword_bindings(app, query, id, opts = {})
|
474
|
+
data, _status_code, _headers = query_delete_keyword_bindings_with_http_info(app, query, id, opts)
|
475
|
+
data
|
476
|
+
end
|
477
|
+
|
478
|
+
# 删除关键词文档绑定
|
479
|
+
# @param app 应用标识
|
480
|
+
# @param query 查询编号
|
481
|
+
# @param id 关键词编号
|
482
|
+
# @param [Hash] opts the optional parameters
|
483
|
+
# @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
|
484
|
+
def query_delete_keyword_bindings_with_http_info(app, query, id, opts = {})
|
485
|
+
if @api_client.config.debugging
|
486
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_delete_keyword_bindings ...'
|
487
|
+
end
|
488
|
+
# verify the required parameter 'app' is set
|
489
|
+
if @api_client.config.client_side_validation && app.nil?
|
490
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_delete_keyword_bindings"
|
491
|
+
end
|
492
|
+
# verify the required parameter 'query' is set
|
493
|
+
if @api_client.config.client_side_validation && query.nil?
|
494
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_delete_keyword_bindings"
|
495
|
+
end
|
496
|
+
# verify the required parameter 'id' is set
|
497
|
+
if @api_client.config.client_side_validation && id.nil?
|
498
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling QueriesApi.query_delete_keyword_bindings"
|
499
|
+
end
|
500
|
+
# resource path
|
501
|
+
local_var_path = '/queries/{app}/keyword-bindings'.sub('{' + 'app' + '}', app.to_s)
|
502
|
+
|
503
|
+
# query parameters
|
504
|
+
query_params = opts[:query_params] || {}
|
505
|
+
query_params[:'query'] = query
|
506
|
+
query_params[:'id'] = id
|
507
|
+
|
508
|
+
# header parameters
|
509
|
+
header_params = opts[:header_params] || {}
|
510
|
+
# HTTP header 'Accept' (if needed)
|
511
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
512
|
+
|
513
|
+
# form parameters
|
514
|
+
form_params = opts[:form_params] || {}
|
515
|
+
|
516
|
+
# http body (model)
|
517
|
+
post_body = opts[:body]
|
518
|
+
|
519
|
+
return_type = opts[:return_type] || 'BOOLEAN'
|
520
|
+
|
521
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
522
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
523
|
+
:header_params => header_params,
|
524
|
+
:query_params => query_params,
|
525
|
+
:form_params => form_params,
|
526
|
+
:body => post_body,
|
527
|
+
:auth_names => auth_names,
|
528
|
+
:return_type => return_type)
|
529
|
+
|
530
|
+
if @api_client.config.debugging
|
531
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_delete_keyword_bindings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
532
|
+
end
|
533
|
+
return data, status_code, headers
|
534
|
+
end
|
535
|
+
# 清除查询条件的节点位置信息
|
536
|
+
# @param app 应用标识
|
537
|
+
# @param query 查询编号
|
538
|
+
# @param [Hash] opts the optional parameters
|
539
|
+
# @return [BOOLEAN]
|
540
|
+
def query_delete_node_positions(app, query, opts = {})
|
541
|
+
data, _status_code, _headers = query_delete_node_positions_with_http_info(app, query, opts)
|
542
|
+
data
|
543
|
+
end
|
544
|
+
|
545
|
+
# 清除查询条件的节点位置信息
|
546
|
+
# @param app 应用标识
|
547
|
+
# @param query 查询编号
|
548
|
+
# @param [Hash] opts the optional parameters
|
549
|
+
# @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
|
550
|
+
def query_delete_node_positions_with_http_info(app, query, opts = {})
|
551
|
+
if @api_client.config.debugging
|
552
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_delete_node_positions ...'
|
553
|
+
end
|
554
|
+
# verify the required parameter 'app' is set
|
555
|
+
if @api_client.config.client_side_validation && app.nil?
|
556
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_delete_node_positions"
|
557
|
+
end
|
558
|
+
# verify the required parameter 'query' is set
|
559
|
+
if @api_client.config.client_side_validation && query.nil?
|
560
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_delete_node_positions"
|
561
|
+
end
|
562
|
+
# resource path
|
563
|
+
local_var_path = '/queries/{app}/node-positions'.sub('{' + 'app' + '}', app.to_s)
|
564
|
+
|
565
|
+
# query parameters
|
566
|
+
query_params = opts[:query_params] || {}
|
567
|
+
query_params[:'query'] = query
|
568
|
+
|
569
|
+
# header parameters
|
570
|
+
header_params = opts[:header_params] || {}
|
571
|
+
# HTTP header 'Accept' (if needed)
|
572
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
573
|
+
|
574
|
+
# form parameters
|
575
|
+
form_params = opts[:form_params] || {}
|
576
|
+
|
577
|
+
# http body (model)
|
578
|
+
post_body = opts[:body]
|
579
|
+
|
580
|
+
return_type = opts[:return_type] || 'BOOLEAN'
|
581
|
+
|
582
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
583
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
584
|
+
:header_params => header_params,
|
585
|
+
:query_params => query_params,
|
586
|
+
:form_params => form_params,
|
587
|
+
:body => post_body,
|
588
|
+
:auth_names => auth_names,
|
589
|
+
:return_type => return_type)
|
590
|
+
|
591
|
+
if @api_client.config.debugging
|
592
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_delete_node_positions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
593
|
+
end
|
594
|
+
return data, status_code, headers
|
595
|
+
end
|
596
|
+
# 删除预定义查询变量
|
597
|
+
# @param app 应用标识
|
598
|
+
# @param id 自定义查询变量编号
|
599
|
+
# @param [Hash] opts the optional parameters
|
600
|
+
# @return [BOOLEAN]
|
601
|
+
def query_delete_variable(app, id, opts = {})
|
602
|
+
data, _status_code, _headers = query_delete_variable_with_http_info(app, id, opts)
|
603
|
+
data
|
604
|
+
end
|
605
|
+
|
606
|
+
# 删除预定义查询变量
|
607
|
+
# @param app 应用标识
|
608
|
+
# @param id 自定义查询变量编号
|
609
|
+
# @param [Hash] opts the optional parameters
|
610
|
+
# @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
|
611
|
+
def query_delete_variable_with_http_info(app, id, opts = {})
|
612
|
+
if @api_client.config.debugging
|
613
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_delete_variable ...'
|
614
|
+
end
|
615
|
+
# verify the required parameter 'app' is set
|
616
|
+
if @api_client.config.client_side_validation && app.nil?
|
617
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_delete_variable"
|
618
|
+
end
|
619
|
+
# verify the required parameter 'id' is set
|
620
|
+
if @api_client.config.client_side_validation && id.nil?
|
621
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling QueriesApi.query_delete_variable"
|
622
|
+
end
|
623
|
+
# resource path
|
624
|
+
local_var_path = '/queries/{app}/variables'.sub('{' + 'app' + '}', app.to_s)
|
625
|
+
|
626
|
+
# query parameters
|
627
|
+
query_params = opts[:query_params] || {}
|
628
|
+
query_params[:'id'] = id
|
629
|
+
|
630
|
+
# header parameters
|
631
|
+
header_params = opts[:header_params] || {}
|
632
|
+
# HTTP header 'Accept' (if needed)
|
633
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
634
|
+
|
635
|
+
# form parameters
|
636
|
+
form_params = opts[:form_params] || {}
|
637
|
+
|
638
|
+
# http body (model)
|
639
|
+
post_body = opts[:body]
|
640
|
+
|
641
|
+
return_type = opts[:return_type] || 'BOOLEAN'
|
642
|
+
|
643
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
644
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
645
|
+
:header_params => header_params,
|
646
|
+
:query_params => query_params,
|
647
|
+
:form_params => form_params,
|
648
|
+
:body => post_body,
|
649
|
+
:auth_names => auth_names,
|
650
|
+
:return_type => return_type)
|
651
|
+
|
652
|
+
if @api_client.config.debugging
|
653
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_delete_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
654
|
+
end
|
655
|
+
return data, status_code, headers
|
656
|
+
end
|
657
|
+
# 获取查询关联的所有索引的字段信息
|
658
|
+
# @param app 应用标识
|
659
|
+
# @param query 查询编号
|
660
|
+
# @param [Hash] opts the optional parameters
|
661
|
+
# @return [Array<IndexFieldBean>]
|
662
|
+
def query_fields(app, query, opts = {})
|
663
|
+
data, _status_code, _headers = query_fields_with_http_info(app, query, opts)
|
664
|
+
data
|
665
|
+
end
|
666
|
+
|
667
|
+
# 获取查询关联的所有索引的字段信息
|
668
|
+
# @param app 应用标识
|
669
|
+
# @param query 查询编号
|
670
|
+
# @param [Hash] opts the optional parameters
|
671
|
+
# @return [Array<(Array<IndexFieldBean>, Integer, Hash)>] Array<IndexFieldBean> data, response status code and response headers
|
672
|
+
def query_fields_with_http_info(app, query, opts = {})
|
673
|
+
if @api_client.config.debugging
|
674
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_fields ...'
|
675
|
+
end
|
676
|
+
# verify the required parameter 'app' is set
|
677
|
+
if @api_client.config.client_side_validation && app.nil?
|
678
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_fields"
|
679
|
+
end
|
680
|
+
# verify the required parameter 'query' is set
|
681
|
+
if @api_client.config.client_side_validation && query.nil?
|
682
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_fields"
|
683
|
+
end
|
684
|
+
# resource path
|
685
|
+
local_var_path = '/queries/{app}/fields'.sub('{' + 'app' + '}', app.to_s)
|
686
|
+
|
687
|
+
# query parameters
|
688
|
+
query_params = opts[:query_params] || {}
|
689
|
+
query_params[:'query'] = query
|
690
|
+
|
691
|
+
# header parameters
|
692
|
+
header_params = opts[:header_params] || {}
|
693
|
+
# HTTP header 'Accept' (if needed)
|
694
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
695
|
+
|
696
|
+
# form parameters
|
697
|
+
form_params = opts[:form_params] || {}
|
698
|
+
|
699
|
+
# http body (model)
|
700
|
+
post_body = opts[:body]
|
701
|
+
|
702
|
+
return_type = opts[:return_type] || 'Array<IndexFieldBean>'
|
703
|
+
|
704
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
705
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
706
|
+
:header_params => header_params,
|
707
|
+
:query_params => query_params,
|
708
|
+
:form_params => form_params,
|
709
|
+
:body => post_body,
|
710
|
+
:auth_names => auth_names,
|
711
|
+
:return_type => return_type)
|
712
|
+
|
713
|
+
if @api_client.config.debugging
|
714
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_fields\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
715
|
+
end
|
716
|
+
return data, status_code, headers
|
717
|
+
end
|
718
|
+
# 获取查询的详情
|
719
|
+
# @param app 应用标识
|
720
|
+
# @param query 查询编号
|
721
|
+
# @param [Hash] opts the optional parameters
|
722
|
+
# @return [QueryBean]
|
723
|
+
def query_get(app, query, opts = {})
|
724
|
+
data, _status_code, _headers = query_get_with_http_info(app, query, opts)
|
725
|
+
data
|
726
|
+
end
|
727
|
+
|
728
|
+
# 获取查询的详情
|
729
|
+
# @param app 应用标识
|
730
|
+
# @param query 查询编号
|
731
|
+
# @param [Hash] opts the optional parameters
|
732
|
+
# @return [Array<(QueryBean, Integer, Hash)>] QueryBean data, response status code and response headers
|
733
|
+
def query_get_with_http_info(app, query, opts = {})
|
734
|
+
if @api_client.config.debugging
|
735
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_get ...'
|
736
|
+
end
|
737
|
+
# verify the required parameter 'app' is set
|
738
|
+
if @api_client.config.client_side_validation && app.nil?
|
739
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_get"
|
740
|
+
end
|
741
|
+
# verify the required parameter 'query' is set
|
742
|
+
if @api_client.config.client_side_validation && query.nil?
|
743
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_get"
|
744
|
+
end
|
745
|
+
# resource path
|
746
|
+
local_var_path = '/queries/{app}/{query}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'query' + '}', query.to_s)
|
747
|
+
|
748
|
+
# query parameters
|
749
|
+
query_params = opts[:query_params] || {}
|
750
|
+
|
751
|
+
# header parameters
|
752
|
+
header_params = opts[:header_params] || {}
|
753
|
+
# HTTP header 'Accept' (if needed)
|
754
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
755
|
+
|
756
|
+
# form parameters
|
757
|
+
form_params = opts[:form_params] || {}
|
758
|
+
|
759
|
+
# http body (model)
|
760
|
+
post_body = opts[:body]
|
761
|
+
|
762
|
+
return_type = opts[:return_type] || 'QueryBean'
|
763
|
+
|
764
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
765
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
766
|
+
:header_params => header_params,
|
767
|
+
:query_params => query_params,
|
768
|
+
:form_params => form_params,
|
769
|
+
:body => post_body,
|
770
|
+
:auth_names => auth_names,
|
771
|
+
:return_type => return_type)
|
772
|
+
|
773
|
+
if @api_client.config.debugging
|
774
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
775
|
+
end
|
776
|
+
return data, status_code, headers
|
777
|
+
end
|
778
|
+
# 获取查询条件的节点位置信息
|
779
|
+
# @param app 应用标识
|
780
|
+
# @param query 查询编号
|
781
|
+
# @param [Hash] opts the optional parameters
|
782
|
+
# @return [Object]
|
783
|
+
def query_get_node_positions(app, query, opts = {})
|
784
|
+
data, _status_code, _headers = query_get_node_positions_with_http_info(app, query, opts)
|
785
|
+
data
|
786
|
+
end
|
787
|
+
|
788
|
+
# 获取查询条件的节点位置信息
|
789
|
+
# @param app 应用标识
|
790
|
+
# @param query 查询编号
|
791
|
+
# @param [Hash] opts the optional parameters
|
792
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
793
|
+
def query_get_node_positions_with_http_info(app, query, opts = {})
|
794
|
+
if @api_client.config.debugging
|
795
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_get_node_positions ...'
|
796
|
+
end
|
797
|
+
# verify the required parameter 'app' is set
|
798
|
+
if @api_client.config.client_side_validation && app.nil?
|
799
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_get_node_positions"
|
800
|
+
end
|
801
|
+
# verify the required parameter 'query' is set
|
802
|
+
if @api_client.config.client_side_validation && query.nil?
|
803
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_get_node_positions"
|
804
|
+
end
|
805
|
+
# resource path
|
806
|
+
local_var_path = '/queries/{app}/node-positions'.sub('{' + 'app' + '}', app.to_s)
|
807
|
+
|
808
|
+
# query parameters
|
809
|
+
query_params = opts[:query_params] || {}
|
810
|
+
query_params[:'query'] = query
|
811
|
+
|
812
|
+
# header parameters
|
813
|
+
header_params = opts[:header_params] || {}
|
814
|
+
# HTTP header 'Accept' (if needed)
|
815
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
816
|
+
|
817
|
+
# form parameters
|
818
|
+
form_params = opts[:form_params] || {}
|
819
|
+
|
820
|
+
# http body (model)
|
821
|
+
post_body = opts[:body]
|
822
|
+
|
823
|
+
return_type = opts[:return_type] || 'Object'
|
824
|
+
|
825
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
826
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
827
|
+
:header_params => header_params,
|
828
|
+
:query_params => query_params,
|
829
|
+
:form_params => form_params,
|
830
|
+
:body => post_body,
|
831
|
+
:auth_names => auth_names,
|
832
|
+
:return_type => return_type)
|
833
|
+
|
834
|
+
if @api_client.config.debugging
|
835
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_get_node_positions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
836
|
+
end
|
837
|
+
return data, status_code, headers
|
838
|
+
end
|
839
|
+
# 获取记录的详情
|
840
|
+
# @param app 应用标识
|
841
|
+
# @param query 查询编号
|
842
|
+
# @param _id 记录 _id 值
|
843
|
+
# @param [Hash] opts the optional parameters
|
844
|
+
# @return [Object]
|
845
|
+
def query_get_record(app, query, _id, opts = {})
|
846
|
+
data, _status_code, _headers = query_get_record_with_http_info(app, query, _id, opts)
|
847
|
+
data
|
848
|
+
end
|
849
|
+
|
850
|
+
# 获取记录的详情
|
851
|
+
# @param app 应用标识
|
852
|
+
# @param query 查询编号
|
853
|
+
# @param _id 记录 _id 值
|
854
|
+
# @param [Hash] opts the optional parameters
|
855
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
856
|
+
def query_get_record_with_http_info(app, query, _id, opts = {})
|
857
|
+
if @api_client.config.debugging
|
858
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_get_record ...'
|
859
|
+
end
|
860
|
+
# verify the required parameter 'app' is set
|
861
|
+
if @api_client.config.client_side_validation && app.nil?
|
862
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_get_record"
|
863
|
+
end
|
864
|
+
# verify the required parameter 'query' is set
|
865
|
+
if @api_client.config.client_side_validation && query.nil?
|
866
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_get_record"
|
867
|
+
end
|
868
|
+
# verify the required parameter '_id' is set
|
869
|
+
if @api_client.config.client_side_validation && _id.nil?
|
870
|
+
fail ArgumentError, "Missing the required parameter '_id' when calling QueriesApi.query_get_record"
|
871
|
+
end
|
872
|
+
# resource path
|
873
|
+
local_var_path = '/queries/{app}/record'.sub('{' + 'app' + '}', app.to_s)
|
874
|
+
|
875
|
+
# query parameters
|
876
|
+
query_params = opts[:query_params] || {}
|
877
|
+
query_params[:'query'] = query
|
878
|
+
query_params[:'_id'] = _id
|
879
|
+
|
880
|
+
# header parameters
|
881
|
+
header_params = opts[:header_params] || {}
|
882
|
+
# HTTP header 'Accept' (if needed)
|
883
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
884
|
+
|
885
|
+
# form parameters
|
886
|
+
form_params = opts[:form_params] || {}
|
887
|
+
|
888
|
+
# http body (model)
|
889
|
+
post_body = opts[:body]
|
890
|
+
|
891
|
+
return_type = opts[:return_type] || 'Object'
|
892
|
+
|
893
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
894
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
895
|
+
:header_params => header_params,
|
896
|
+
:query_params => query_params,
|
897
|
+
:form_params => form_params,
|
898
|
+
:body => post_body,
|
899
|
+
:auth_names => auth_names,
|
900
|
+
:return_type => return_type)
|
901
|
+
|
902
|
+
if @api_client.config.debugging
|
903
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_get_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
904
|
+
end
|
905
|
+
return data, status_code, headers
|
906
|
+
end
|
907
|
+
# 获取查询的关键词文档绑定列表
|
908
|
+
# @param app 应用标识
|
909
|
+
# @param query 查询编号
|
910
|
+
# @param [Hash] opts the optional parameters
|
911
|
+
# @return [Array<KeywordBindingBean>]
|
912
|
+
def query_keyword_bindings(app, query, opts = {})
|
913
|
+
data, _status_code, _headers = query_keyword_bindings_with_http_info(app, query, opts)
|
914
|
+
data
|
915
|
+
end
|
916
|
+
|
917
|
+
# 获取查询的关键词文档绑定列表
|
918
|
+
# @param app 应用标识
|
919
|
+
# @param query 查询编号
|
920
|
+
# @param [Hash] opts the optional parameters
|
921
|
+
# @return [Array<(Array<KeywordBindingBean>, Integer, Hash)>] Array<KeywordBindingBean> data, response status code and response headers
|
922
|
+
def query_keyword_bindings_with_http_info(app, query, opts = {})
|
923
|
+
if @api_client.config.debugging
|
924
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_keyword_bindings ...'
|
925
|
+
end
|
926
|
+
# verify the required parameter 'app' is set
|
927
|
+
if @api_client.config.client_side_validation && app.nil?
|
928
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_keyword_bindings"
|
929
|
+
end
|
930
|
+
# verify the required parameter 'query' is set
|
931
|
+
if @api_client.config.client_side_validation && query.nil?
|
932
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_keyword_bindings"
|
933
|
+
end
|
934
|
+
# resource path
|
935
|
+
local_var_path = '/queries/{app}/keyword-bindings'.sub('{' + 'app' + '}', app.to_s)
|
936
|
+
|
937
|
+
# query parameters
|
938
|
+
query_params = opts[:query_params] || {}
|
939
|
+
query_params[:'query'] = query
|
940
|
+
|
941
|
+
# header parameters
|
942
|
+
header_params = opts[:header_params] || {}
|
943
|
+
# HTTP header 'Accept' (if needed)
|
944
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
945
|
+
|
946
|
+
# form parameters
|
947
|
+
form_params = opts[:form_params] || {}
|
948
|
+
|
949
|
+
# http body (model)
|
950
|
+
post_body = opts[:body]
|
951
|
+
|
952
|
+
return_type = opts[:return_type] || 'Array<KeywordBindingBean>'
|
953
|
+
|
954
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
955
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
956
|
+
:header_params => header_params,
|
957
|
+
:query_params => query_params,
|
958
|
+
:form_params => form_params,
|
959
|
+
:body => post_body,
|
960
|
+
:auth_names => auth_names,
|
961
|
+
:return_type => return_type)
|
962
|
+
|
963
|
+
if @api_client.config.debugging
|
964
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_keyword_bindings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
965
|
+
end
|
966
|
+
return data, status_code, headers
|
967
|
+
end
|
968
|
+
# 获取应用下所有索引下的查询列表(按索引进行分组)
|
969
|
+
# @param app 应用标识
|
970
|
+
# @param [Hash] opts the optional parameters
|
971
|
+
# @option opts [Integer] :index 索引编号
|
972
|
+
# @return [Array<QueryBean>]
|
973
|
+
def query_list(app, opts = {})
|
974
|
+
data, _status_code, _headers = query_list_with_http_info(app, opts)
|
975
|
+
data
|
976
|
+
end
|
977
|
+
|
978
|
+
# 获取应用下所有索引下的查询列表(按索引进行分组)
|
979
|
+
# @param app 应用标识
|
980
|
+
# @param [Hash] opts the optional parameters
|
981
|
+
# @option opts [Integer] :index 索引编号
|
982
|
+
# @return [Array<(Array<QueryBean>, Integer, Hash)>] Array<QueryBean> data, response status code and response headers
|
983
|
+
def query_list_with_http_info(app, opts = {})
|
984
|
+
if @api_client.config.debugging
|
985
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_list ...'
|
986
|
+
end
|
987
|
+
# verify the required parameter 'app' is set
|
988
|
+
if @api_client.config.client_side_validation && app.nil?
|
989
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_list"
|
990
|
+
end
|
991
|
+
# resource path
|
992
|
+
local_var_path = '/queries/{app}'.sub('{' + 'app' + '}', app.to_s)
|
993
|
+
|
994
|
+
# query parameters
|
995
|
+
query_params = opts[:query_params] || {}
|
996
|
+
query_params[:'index'] = opts[:'index'] if !opts[:'index'].nil?
|
997
|
+
|
998
|
+
# header parameters
|
999
|
+
header_params = opts[:header_params] || {}
|
1000
|
+
# HTTP header 'Accept' (if needed)
|
1001
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1002
|
+
|
1003
|
+
# form parameters
|
1004
|
+
form_params = opts[:form_params] || {}
|
1005
|
+
|
1006
|
+
# http body (model)
|
1007
|
+
post_body = opts[:body]
|
1008
|
+
|
1009
|
+
return_type = opts[:return_type] || 'Array<QueryBean>'
|
1010
|
+
|
1011
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
1012
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1013
|
+
:header_params => header_params,
|
1014
|
+
:query_params => query_params,
|
1015
|
+
:form_params => form_params,
|
1016
|
+
:body => post_body,
|
1017
|
+
:auth_names => auth_names,
|
1018
|
+
:return_type => return_type)
|
1019
|
+
|
1020
|
+
if @api_client.config.debugging
|
1021
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1022
|
+
end
|
1023
|
+
return data, status_code, headers
|
1024
|
+
end
|
1025
|
+
# 获取搜索诊断信息
|
1026
|
+
# @param app 应用标识
|
1027
|
+
# @param query 记录编号
|
1028
|
+
# @param [Hash] opts the optional parameters
|
1029
|
+
# @option opts [String] :q 诊断关键字
|
1030
|
+
# @return [Object]
|
1031
|
+
def query_profile(app, query, opts = {})
|
1032
|
+
data, _status_code, _headers = query_profile_with_http_info(app, query, opts)
|
1033
|
+
data
|
1034
|
+
end
|
1035
|
+
|
1036
|
+
# 获取搜索诊断信息
|
1037
|
+
# @param app 应用标识
|
1038
|
+
# @param query 记录编号
|
1039
|
+
# @param [Hash] opts the optional parameters
|
1040
|
+
# @option opts [String] :q 诊断关键字
|
1041
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
1042
|
+
def query_profile_with_http_info(app, query, opts = {})
|
1043
|
+
if @api_client.config.debugging
|
1044
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_profile ...'
|
1045
|
+
end
|
1046
|
+
# verify the required parameter 'app' is set
|
1047
|
+
if @api_client.config.client_side_validation && app.nil?
|
1048
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_profile"
|
1049
|
+
end
|
1050
|
+
# verify the required parameter 'query' is set
|
1051
|
+
if @api_client.config.client_side_validation && query.nil?
|
1052
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_profile"
|
1053
|
+
end
|
1054
|
+
# resource path
|
1055
|
+
local_var_path = '/queries/{app}/profiler'.sub('{' + 'app' + '}', app.to_s)
|
1056
|
+
|
1057
|
+
# query parameters
|
1058
|
+
query_params = opts[:query_params] || {}
|
1059
|
+
query_params[:'query'] = query
|
1060
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
1061
|
+
|
1062
|
+
# header parameters
|
1063
|
+
header_params = opts[:header_params] || {}
|
1064
|
+
# HTTP header 'Accept' (if needed)
|
1065
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1066
|
+
|
1067
|
+
# form parameters
|
1068
|
+
form_params = opts[:form_params] || {}
|
1069
|
+
|
1070
|
+
# http body (model)
|
1071
|
+
post_body = opts[:body]
|
1072
|
+
|
1073
|
+
return_type = opts[:return_type] || 'Object'
|
1074
|
+
|
1075
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
1076
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1077
|
+
:header_params => header_params,
|
1078
|
+
:query_params => query_params,
|
1079
|
+
:form_params => form_params,
|
1080
|
+
:body => post_body,
|
1081
|
+
:auth_names => auth_names,
|
1082
|
+
:return_type => return_type)
|
1083
|
+
|
1084
|
+
if @api_client.config.debugging
|
1085
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_profile\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1086
|
+
end
|
1087
|
+
return data, status_code, headers
|
1088
|
+
end
|
1089
|
+
# 获取关键词绑定对应的记录列表
|
1090
|
+
# @param app 应用标识
|
1091
|
+
# @param id 关键词绑定编号
|
1092
|
+
# @param [Hash] opts the optional parameters
|
1093
|
+
# @return [Array<Object>]
|
1094
|
+
def query_records_of_keyword_binding(app, id, opts = {})
|
1095
|
+
data, _status_code, _headers = query_records_of_keyword_binding_with_http_info(app, id, opts)
|
1096
|
+
data
|
1097
|
+
end
|
1098
|
+
|
1099
|
+
# 获取关键词绑定对应的记录列表
|
1100
|
+
# @param app 应用标识
|
1101
|
+
# @param id 关键词绑定编号
|
1102
|
+
# @param [Hash] opts the optional parameters
|
1103
|
+
# @return [Array<(Array<Object>, Integer, Hash)>] Array<Object> data, response status code and response headers
|
1104
|
+
def query_records_of_keyword_binding_with_http_info(app, id, opts = {})
|
1105
|
+
if @api_client.config.debugging
|
1106
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_records_of_keyword_binding ...'
|
1107
|
+
end
|
1108
|
+
# verify the required parameter 'app' is set
|
1109
|
+
if @api_client.config.client_side_validation && app.nil?
|
1110
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_records_of_keyword_binding"
|
1111
|
+
end
|
1112
|
+
# verify the required parameter 'id' is set
|
1113
|
+
if @api_client.config.client_side_validation && id.nil?
|
1114
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling QueriesApi.query_records_of_keyword_binding"
|
1115
|
+
end
|
1116
|
+
# resource path
|
1117
|
+
local_var_path = '/queries/{app}/keyword-bindings-records'.sub('{' + 'app' + '}', app.to_s)
|
1118
|
+
|
1119
|
+
# query parameters
|
1120
|
+
query_params = opts[:query_params] || {}
|
1121
|
+
query_params[:'id'] = id
|
1122
|
+
|
1123
|
+
# header parameters
|
1124
|
+
header_params = opts[:header_params] || {}
|
1125
|
+
# HTTP header 'Accept' (if needed)
|
1126
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1127
|
+
|
1128
|
+
# form parameters
|
1129
|
+
form_params = opts[:form_params] || {}
|
1130
|
+
|
1131
|
+
# http body (model)
|
1132
|
+
post_body = opts[:body]
|
1133
|
+
|
1134
|
+
return_type = opts[:return_type] || 'Array<Object>'
|
1135
|
+
|
1136
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
1137
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1138
|
+
:header_params => header_params,
|
1139
|
+
:query_params => query_params,
|
1140
|
+
:form_params => form_params,
|
1141
|
+
:body => post_body,
|
1142
|
+
:auth_names => auth_names,
|
1143
|
+
:return_type => return_type)
|
1144
|
+
|
1145
|
+
if @api_client.config.debugging
|
1146
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_records_of_keyword_binding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1147
|
+
end
|
1148
|
+
return data, status_code, headers
|
1149
|
+
end
|
1150
|
+
# 设置索引智能匹配字段
|
1151
|
+
# @param app 应用标识
|
1152
|
+
# @param query 查询编号
|
1153
|
+
# @param [Hash] opts the optional parameters
|
1154
|
+
# @option opts [Array<String>] :fields 字段列表
|
1155
|
+
# @return [BOOLEAN]
|
1156
|
+
def query_save_intelligent_mappings(app, query, opts = {})
|
1157
|
+
data, _status_code, _headers = query_save_intelligent_mappings_with_http_info(app, query, opts)
|
1158
|
+
data
|
1159
|
+
end
|
1160
|
+
|
1161
|
+
# 设置索引智能匹配字段
|
1162
|
+
# @param app 应用标识
|
1163
|
+
# @param query 查询编号
|
1164
|
+
# @param [Hash] opts the optional parameters
|
1165
|
+
# @option opts [Array<String>] :fields 字段列表
|
1166
|
+
# @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
|
1167
|
+
def query_save_intelligent_mappings_with_http_info(app, query, opts = {})
|
1168
|
+
if @api_client.config.debugging
|
1169
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_save_intelligent_mappings ...'
|
1170
|
+
end
|
1171
|
+
# verify the required parameter 'app' is set
|
1172
|
+
if @api_client.config.client_side_validation && app.nil?
|
1173
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_save_intelligent_mappings"
|
1174
|
+
end
|
1175
|
+
# verify the required parameter 'query' is set
|
1176
|
+
if @api_client.config.client_side_validation && query.nil?
|
1177
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_save_intelligent_mappings"
|
1178
|
+
end
|
1179
|
+
# resource path
|
1180
|
+
local_var_path = '/queries/{app}/intelligent-mappings'.sub('{' + 'app' + '}', app.to_s)
|
1181
|
+
|
1182
|
+
# query parameters
|
1183
|
+
query_params = opts[:query_params] || {}
|
1184
|
+
query_params[:'query'] = query
|
1185
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
1186
|
+
|
1187
|
+
# header parameters
|
1188
|
+
header_params = opts[:header_params] || {}
|
1189
|
+
# HTTP header 'Accept' (if needed)
|
1190
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1191
|
+
|
1192
|
+
# form parameters
|
1193
|
+
form_params = opts[:form_params] || {}
|
1194
|
+
|
1195
|
+
# http body (model)
|
1196
|
+
post_body = opts[:body]
|
1197
|
+
|
1198
|
+
return_type = opts[:return_type] || 'BOOLEAN'
|
1199
|
+
|
1200
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
1201
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1202
|
+
:header_params => header_params,
|
1203
|
+
:query_params => query_params,
|
1204
|
+
:form_params => form_params,
|
1205
|
+
:body => post_body,
|
1206
|
+
:auth_names => auth_names,
|
1207
|
+
:return_type => return_type)
|
1208
|
+
|
1209
|
+
if @api_client.config.debugging
|
1210
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_save_intelligent_mappings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1211
|
+
end
|
1212
|
+
return data, status_code, headers
|
1213
|
+
end
|
1214
|
+
# 保存查询条件的节点位置信息
|
1215
|
+
# @param body
|
1216
|
+
# @param query 查询编号
|
1217
|
+
# @param app 应用标识
|
1218
|
+
# @param [Hash] opts the optional parameters
|
1219
|
+
# @return [Object]
|
1220
|
+
def query_save_node_positions(body, query, app, opts = {})
|
1221
|
+
data, _status_code, _headers = query_save_node_positions_with_http_info(body, query, app, opts)
|
1222
|
+
data
|
1223
|
+
end
|
1224
|
+
|
1225
|
+
# 保存查询条件的节点位置信息
|
1226
|
+
# @param body
|
1227
|
+
# @param query 查询编号
|
1228
|
+
# @param app 应用标识
|
1229
|
+
# @param [Hash] opts the optional parameters
|
1230
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
1231
|
+
def query_save_node_positions_with_http_info(body, query, app, opts = {})
|
1232
|
+
if @api_client.config.debugging
|
1233
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_save_node_positions ...'
|
1234
|
+
end
|
1235
|
+
# verify the required parameter 'body' is set
|
1236
|
+
if @api_client.config.client_side_validation && body.nil?
|
1237
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling QueriesApi.query_save_node_positions"
|
1238
|
+
end
|
1239
|
+
# verify the required parameter 'query' is set
|
1240
|
+
if @api_client.config.client_side_validation && query.nil?
|
1241
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_save_node_positions"
|
1242
|
+
end
|
1243
|
+
# verify the required parameter 'app' is set
|
1244
|
+
if @api_client.config.client_side_validation && app.nil?
|
1245
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_save_node_positions"
|
1246
|
+
end
|
1247
|
+
# resource path
|
1248
|
+
local_var_path = '/queries/{app}/node-positions'.sub('{' + 'app' + '}', app.to_s)
|
1249
|
+
|
1250
|
+
# query parameters
|
1251
|
+
query_params = opts[:query_params] || {}
|
1252
|
+
query_params[:'query'] = query
|
1253
|
+
|
1254
|
+
# header parameters
|
1255
|
+
header_params = opts[:header_params] || {}
|
1256
|
+
# HTTP header 'Accept' (if needed)
|
1257
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1258
|
+
# HTTP header 'Content-Type'
|
1259
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1260
|
+
|
1261
|
+
# form parameters
|
1262
|
+
form_params = opts[:form_params] || {}
|
1263
|
+
|
1264
|
+
# http body (model)
|
1265
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
1266
|
+
|
1267
|
+
return_type = opts[:return_type] || 'Object'
|
1268
|
+
|
1269
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
1270
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1271
|
+
:header_params => header_params,
|
1272
|
+
:query_params => query_params,
|
1273
|
+
:form_params => form_params,
|
1274
|
+
:body => post_body,
|
1275
|
+
:auth_names => auth_names,
|
1276
|
+
:return_type => return_type)
|
1277
|
+
|
1278
|
+
if @api_client.config.debugging
|
1279
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_save_node_positions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1280
|
+
end
|
1281
|
+
return data, status_code, headers
|
1282
|
+
end
|
1283
|
+
# 搜索测试
|
1284
|
+
# 该接口主要用于定制查询的测试,必须授权才能访问
|
1285
|
+
# @param app 应用标识
|
1286
|
+
# @param query 查询编号
|
1287
|
+
# @param from 起始记录
|
1288
|
+
# @param size 每页记录数量
|
1289
|
+
# @param [Hash] opts the optional parameters
|
1290
|
+
# @option opts [String] :q 查询关键字
|
1291
|
+
# @option opts [Hash<String, String>] :params 聚合参数
|
1292
|
+
# @return [Object]
|
1293
|
+
def query_search(app, query, from, size, opts = {})
|
1294
|
+
data, _status_code, _headers = query_search_with_http_info(app, query, from, size, opts)
|
1295
|
+
data
|
1296
|
+
end
|
1297
|
+
|
1298
|
+
# 搜索测试
|
1299
|
+
# 该接口主要用于定制查询的测试,必须授权才能访问
|
1300
|
+
# @param app 应用标识
|
1301
|
+
# @param query 查询编号
|
1302
|
+
# @param from 起始记录
|
1303
|
+
# @param size 每页记录数量
|
1304
|
+
# @param [Hash] opts the optional parameters
|
1305
|
+
# @option opts [String] :q 查询关键字
|
1306
|
+
# @option opts [Hash<String, String>] :params 聚合参数
|
1307
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
1308
|
+
def query_search_with_http_info(app, query, from, size, opts = {})
|
1309
|
+
if @api_client.config.debugging
|
1310
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_search ...'
|
1311
|
+
end
|
1312
|
+
# verify the required parameter 'app' is set
|
1313
|
+
if @api_client.config.client_side_validation && app.nil?
|
1314
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_search"
|
1315
|
+
end
|
1316
|
+
# verify the required parameter 'query' is set
|
1317
|
+
if @api_client.config.client_side_validation && query.nil?
|
1318
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_search"
|
1319
|
+
end
|
1320
|
+
# verify the required parameter 'from' is set
|
1321
|
+
if @api_client.config.client_side_validation && from.nil?
|
1322
|
+
fail ArgumentError, "Missing the required parameter 'from' when calling QueriesApi.query_search"
|
1323
|
+
end
|
1324
|
+
# verify the required parameter 'size' is set
|
1325
|
+
if @api_client.config.client_side_validation && size.nil?
|
1326
|
+
fail ArgumentError, "Missing the required parameter 'size' when calling QueriesApi.query_search"
|
1327
|
+
end
|
1328
|
+
# resource path
|
1329
|
+
local_var_path = '/queries/{app}/search'.sub('{' + 'app' + '}', app.to_s)
|
1330
|
+
|
1331
|
+
# query parameters
|
1332
|
+
query_params = opts[:query_params] || {}
|
1333
|
+
query_params[:'query'] = query
|
1334
|
+
query_params[:'from'] = from
|
1335
|
+
query_params[:'size'] = size
|
1336
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
1337
|
+
query_params[:'params'] = @api_client.build_collection_param(opts[:'params'], :multi) if !opts[:'params'].nil?
|
1338
|
+
|
1339
|
+
# header parameters
|
1340
|
+
header_params = opts[:header_params] || {}
|
1341
|
+
# HTTP header 'Accept' (if needed)
|
1342
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1343
|
+
|
1344
|
+
# form parameters
|
1345
|
+
form_params = opts[:form_params] || {}
|
1346
|
+
|
1347
|
+
# http body (model)
|
1348
|
+
post_body = opts[:body]
|
1349
|
+
|
1350
|
+
return_type = opts[:return_type] || 'Object'
|
1351
|
+
|
1352
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
1353
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1354
|
+
:header_params => header_params,
|
1355
|
+
:query_params => query_params,
|
1356
|
+
:form_params => form_params,
|
1357
|
+
:body => post_body,
|
1358
|
+
:auth_names => auth_names,
|
1359
|
+
:return_type => return_type)
|
1360
|
+
|
1361
|
+
if @api_client.config.debugging
|
1362
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1363
|
+
end
|
1364
|
+
return data, status_code, headers
|
1365
|
+
end
|
1366
|
+
# 获取最终查询的源码(JSON)
|
1367
|
+
# @param app 应用标识
|
1368
|
+
# @param query 查询编号
|
1369
|
+
# @param [Hash] opts the optional parameters
|
1370
|
+
# @option opts [String] :q 搜索关键字
|
1371
|
+
# @return [Object]
|
1372
|
+
def query_source(app, query, opts = {})
|
1373
|
+
data, _status_code, _headers = query_source_with_http_info(app, query, opts)
|
1374
|
+
data
|
1375
|
+
end
|
1376
|
+
|
1377
|
+
# 获取最终查询的源码(JSON)
|
1378
|
+
# @param app 应用标识
|
1379
|
+
# @param query 查询编号
|
1380
|
+
# @param [Hash] opts the optional parameters
|
1381
|
+
# @option opts [String] :q 搜索关键字
|
1382
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
1383
|
+
def query_source_with_http_info(app, query, opts = {})
|
1384
|
+
if @api_client.config.debugging
|
1385
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_source ...'
|
1386
|
+
end
|
1387
|
+
# verify the required parameter 'app' is set
|
1388
|
+
if @api_client.config.client_side_validation && app.nil?
|
1389
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_source"
|
1390
|
+
end
|
1391
|
+
# verify the required parameter 'query' is set
|
1392
|
+
if @api_client.config.client_side_validation && query.nil?
|
1393
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_source"
|
1394
|
+
end
|
1395
|
+
# resource path
|
1396
|
+
local_var_path = '/queries/{app}/{query}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'query' + '}', query.to_s)
|
1397
|
+
|
1398
|
+
# query parameters
|
1399
|
+
query_params = opts[:query_params] || {}
|
1400
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
1401
|
+
|
1402
|
+
# header parameters
|
1403
|
+
header_params = opts[:header_params] || {}
|
1404
|
+
# HTTP header 'Accept' (if needed)
|
1405
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1406
|
+
|
1407
|
+
# form parameters
|
1408
|
+
form_params = opts[:form_params] || {}
|
1409
|
+
|
1410
|
+
# http body (model)
|
1411
|
+
post_body = opts[:body]
|
1412
|
+
|
1413
|
+
return_type = opts[:return_type] || 'Object'
|
1414
|
+
|
1415
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
1416
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1417
|
+
:header_params => header_params,
|
1418
|
+
:query_params => query_params,
|
1419
|
+
:form_params => form_params,
|
1420
|
+
:body => post_body,
|
1421
|
+
:auth_names => auth_names,
|
1422
|
+
:return_type => return_type)
|
1423
|
+
|
1424
|
+
if @api_client.config.debugging
|
1425
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_source\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1426
|
+
end
|
1427
|
+
return data, status_code, headers
|
1428
|
+
end
|
1429
|
+
# 获取搜索建议列表
|
1430
|
+
# @param app 应用标识
|
1431
|
+
# @param query 查询编号
|
1432
|
+
# @param q 搜索关键字
|
1433
|
+
# @param [Hash] opts the optional parameters
|
1434
|
+
# @return [Array<Object>]
|
1435
|
+
def query_suggest(app, query, q, opts = {})
|
1436
|
+
data, _status_code, _headers = query_suggest_with_http_info(app, query, q, opts)
|
1437
|
+
data
|
1438
|
+
end
|
1439
|
+
|
1440
|
+
# 获取搜索建议列表
|
1441
|
+
# @param app 应用标识
|
1442
|
+
# @param query 查询编号
|
1443
|
+
# @param q 搜索关键字
|
1444
|
+
# @param [Hash] opts the optional parameters
|
1445
|
+
# @return [Array<(Array<Object>, Integer, Hash)>] Array<Object> data, response status code and response headers
|
1446
|
+
def query_suggest_with_http_info(app, query, q, opts = {})
|
1447
|
+
if @api_client.config.debugging
|
1448
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_suggest ...'
|
1449
|
+
end
|
1450
|
+
# verify the required parameter 'app' is set
|
1451
|
+
if @api_client.config.client_side_validation && app.nil?
|
1452
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_suggest"
|
1453
|
+
end
|
1454
|
+
# verify the required parameter 'query' is set
|
1455
|
+
if @api_client.config.client_side_validation && query.nil?
|
1456
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_suggest"
|
1457
|
+
end
|
1458
|
+
# verify the required parameter 'q' is set
|
1459
|
+
if @api_client.config.client_side_validation && q.nil?
|
1460
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling QueriesApi.query_suggest"
|
1461
|
+
end
|
1462
|
+
# resource path
|
1463
|
+
local_var_path = '/queries/{app}/suggest'.sub('{' + 'app' + '}', app.to_s)
|
1464
|
+
|
1465
|
+
# query parameters
|
1466
|
+
query_params = opts[:query_params] || {}
|
1467
|
+
query_params[:'query'] = query
|
1468
|
+
query_params[:'q'] = q
|
1469
|
+
|
1470
|
+
# header parameters
|
1471
|
+
header_params = opts[:header_params] || {}
|
1472
|
+
# HTTP header 'Accept' (if needed)
|
1473
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1474
|
+
|
1475
|
+
# form parameters
|
1476
|
+
form_params = opts[:form_params] || {}
|
1477
|
+
|
1478
|
+
# http body (model)
|
1479
|
+
post_body = opts[:body]
|
1480
|
+
|
1481
|
+
return_type = opts[:return_type] || 'Array<Object>'
|
1482
|
+
|
1483
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
1484
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1485
|
+
:header_params => header_params,
|
1486
|
+
:query_params => query_params,
|
1487
|
+
:form_params => form_params,
|
1488
|
+
:body => post_body,
|
1489
|
+
:auth_names => auth_names,
|
1490
|
+
:return_type => return_type)
|
1491
|
+
|
1492
|
+
if @api_client.config.debugging
|
1493
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_suggest\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1494
|
+
end
|
1495
|
+
return data, status_code, headers
|
1496
|
+
end
|
1497
|
+
# 测试索引智能匹配字段
|
1498
|
+
# @param app 应用标识
|
1499
|
+
# @param query 查询编号
|
1500
|
+
# @param q 搜索内容
|
1501
|
+
# @param [Hash] opts the optional parameters
|
1502
|
+
# @option opts [Array<String>] :fields 字段列表
|
1503
|
+
# @return [Array<IntelligentMapping>]
|
1504
|
+
def query_test_intelligent_mappings(app, query, q, opts = {})
|
1505
|
+
data, _status_code, _headers = query_test_intelligent_mappings_with_http_info(app, query, q, opts)
|
1506
|
+
data
|
1507
|
+
end
|
1508
|
+
|
1509
|
+
# 测试索引智能匹配字段
|
1510
|
+
# @param app 应用标识
|
1511
|
+
# @param query 查询编号
|
1512
|
+
# @param q 搜索内容
|
1513
|
+
# @param [Hash] opts the optional parameters
|
1514
|
+
# @option opts [Array<String>] :fields 字段列表
|
1515
|
+
# @return [Array<(Array<IntelligentMapping>, Integer, Hash)>] Array<IntelligentMapping> data, response status code and response headers
|
1516
|
+
def query_test_intelligent_mappings_with_http_info(app, query, q, opts = {})
|
1517
|
+
if @api_client.config.debugging
|
1518
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_test_intelligent_mappings ...'
|
1519
|
+
end
|
1520
|
+
# verify the required parameter 'app' is set
|
1521
|
+
if @api_client.config.client_side_validation && app.nil?
|
1522
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_test_intelligent_mappings"
|
1523
|
+
end
|
1524
|
+
# verify the required parameter 'query' is set
|
1525
|
+
if @api_client.config.client_side_validation && query.nil?
|
1526
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_test_intelligent_mappings"
|
1527
|
+
end
|
1528
|
+
# verify the required parameter 'q' is set
|
1529
|
+
if @api_client.config.client_side_validation && q.nil?
|
1530
|
+
fail ArgumentError, "Missing the required parameter 'q' when calling QueriesApi.query_test_intelligent_mappings"
|
1531
|
+
end
|
1532
|
+
# resource path
|
1533
|
+
local_var_path = '/queries/{app}/intelligent-mappings'.sub('{' + 'app' + '}', app.to_s)
|
1534
|
+
|
1535
|
+
# query parameters
|
1536
|
+
query_params = opts[:query_params] || {}
|
1537
|
+
query_params[:'query'] = query
|
1538
|
+
query_params[:'q'] = q
|
1539
|
+
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
|
1540
|
+
|
1541
|
+
# header parameters
|
1542
|
+
header_params = opts[:header_params] || {}
|
1543
|
+
# HTTP header 'Accept' (if needed)
|
1544
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1545
|
+
|
1546
|
+
# form parameters
|
1547
|
+
form_params = opts[:form_params] || {}
|
1548
|
+
|
1549
|
+
# http body (model)
|
1550
|
+
post_body = opts[:body]
|
1551
|
+
|
1552
|
+
return_type = opts[:return_type] || 'Array<IntelligentMapping>'
|
1553
|
+
|
1554
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
1555
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1556
|
+
:header_params => header_params,
|
1557
|
+
:query_params => query_params,
|
1558
|
+
:form_params => form_params,
|
1559
|
+
:body => post_body,
|
1560
|
+
:auth_names => auth_names,
|
1561
|
+
:return_type => return_type)
|
1562
|
+
|
1563
|
+
if @api_client.config.debugging
|
1564
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_test_intelligent_mappings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1565
|
+
end
|
1566
|
+
return data, status_code, headers
|
1567
|
+
end
|
1568
|
+
# 修改查询
|
1569
|
+
# @param body
|
1570
|
+
# @param query 查询编号
|
1571
|
+
# @param app 应用标识
|
1572
|
+
# @param [Hash] opts the optional parameters
|
1573
|
+
# @return [QueryBean]
|
1574
|
+
def query_update(body, query, app, opts = {})
|
1575
|
+
data, _status_code, _headers = query_update_with_http_info(body, query, app, opts)
|
1576
|
+
data
|
1577
|
+
end
|
1578
|
+
|
1579
|
+
# 修改查询
|
1580
|
+
# @param body
|
1581
|
+
# @param query 查询编号
|
1582
|
+
# @param app 应用标识
|
1583
|
+
# @param [Hash] opts the optional parameters
|
1584
|
+
# @return [Array<(QueryBean, Integer, Hash)>] QueryBean data, response status code and response headers
|
1585
|
+
def query_update_with_http_info(body, query, app, opts = {})
|
1586
|
+
if @api_client.config.debugging
|
1587
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_update ...'
|
1588
|
+
end
|
1589
|
+
# verify the required parameter 'body' is set
|
1590
|
+
if @api_client.config.client_side_validation && body.nil?
|
1591
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling QueriesApi.query_update"
|
1592
|
+
end
|
1593
|
+
# verify the required parameter 'query' is set
|
1594
|
+
if @api_client.config.client_side_validation && query.nil?
|
1595
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_update"
|
1596
|
+
end
|
1597
|
+
# verify the required parameter 'app' is set
|
1598
|
+
if @api_client.config.client_side_validation && app.nil?
|
1599
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_update"
|
1600
|
+
end
|
1601
|
+
# resource path
|
1602
|
+
local_var_path = '/queries/{app}'.sub('{' + 'app' + '}', app.to_s)
|
1603
|
+
|
1604
|
+
# query parameters
|
1605
|
+
query_params = opts[:query_params] || {}
|
1606
|
+
query_params[:'query'] = query
|
1607
|
+
|
1608
|
+
# header parameters
|
1609
|
+
header_params = opts[:header_params] || {}
|
1610
|
+
# HTTP header 'Accept' (if needed)
|
1611
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1612
|
+
# HTTP header 'Content-Type'
|
1613
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1614
|
+
|
1615
|
+
# form parameters
|
1616
|
+
form_params = opts[:form_params] || {}
|
1617
|
+
|
1618
|
+
# http body (model)
|
1619
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
1620
|
+
|
1621
|
+
return_type = opts[:return_type] || 'QueryBean'
|
1622
|
+
|
1623
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
1624
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1625
|
+
:header_params => header_params,
|
1626
|
+
:query_params => query_params,
|
1627
|
+
:form_params => form_params,
|
1628
|
+
:body => post_body,
|
1629
|
+
:auth_names => auth_names,
|
1630
|
+
:return_type => return_type)
|
1631
|
+
|
1632
|
+
if @api_client.config.debugging
|
1633
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1634
|
+
end
|
1635
|
+
return data, status_code, headers
|
1636
|
+
end
|
1637
|
+
# 修改关键词文档绑定
|
1638
|
+
# @param body
|
1639
|
+
# @param query 查询编号
|
1640
|
+
# @param app 应用标识
|
1641
|
+
# @param [Hash] opts the optional parameters
|
1642
|
+
# @return [KeywordBindingBean]
|
1643
|
+
def query_update_keyword_bindings(body, query, app, opts = {})
|
1644
|
+
data, _status_code, _headers = query_update_keyword_bindings_with_http_info(body, query, app, opts)
|
1645
|
+
data
|
1646
|
+
end
|
1647
|
+
|
1648
|
+
# 修改关键词文档绑定
|
1649
|
+
# @param body
|
1650
|
+
# @param query 查询编号
|
1651
|
+
# @param app 应用标识
|
1652
|
+
# @param [Hash] opts the optional parameters
|
1653
|
+
# @return [Array<(KeywordBindingBean, Integer, Hash)>] KeywordBindingBean data, response status code and response headers
|
1654
|
+
def query_update_keyword_bindings_with_http_info(body, query, app, opts = {})
|
1655
|
+
if @api_client.config.debugging
|
1656
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_update_keyword_bindings ...'
|
1657
|
+
end
|
1658
|
+
# verify the required parameter 'body' is set
|
1659
|
+
if @api_client.config.client_side_validation && body.nil?
|
1660
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling QueriesApi.query_update_keyword_bindings"
|
1661
|
+
end
|
1662
|
+
# verify the required parameter 'query' is set
|
1663
|
+
if @api_client.config.client_side_validation && query.nil?
|
1664
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_update_keyword_bindings"
|
1665
|
+
end
|
1666
|
+
# verify the required parameter 'app' is set
|
1667
|
+
if @api_client.config.client_side_validation && app.nil?
|
1668
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_update_keyword_bindings"
|
1669
|
+
end
|
1670
|
+
# resource path
|
1671
|
+
local_var_path = '/queries/{app}/keyword-bindings'.sub('{' + 'app' + '}', app.to_s)
|
1672
|
+
|
1673
|
+
# query parameters
|
1674
|
+
query_params = opts[:query_params] || {}
|
1675
|
+
query_params[:'query'] = query
|
1676
|
+
|
1677
|
+
# header parameters
|
1678
|
+
header_params = opts[:header_params] || {}
|
1679
|
+
# HTTP header 'Accept' (if needed)
|
1680
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1681
|
+
# HTTP header 'Content-Type'
|
1682
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1683
|
+
|
1684
|
+
# form parameters
|
1685
|
+
form_params = opts[:form_params] || {}
|
1686
|
+
|
1687
|
+
# http body (model)
|
1688
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
1689
|
+
|
1690
|
+
return_type = opts[:return_type] || 'KeywordBindingBean'
|
1691
|
+
|
1692
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
1693
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
1694
|
+
:header_params => header_params,
|
1695
|
+
:query_params => query_params,
|
1696
|
+
:form_params => form_params,
|
1697
|
+
:body => post_body,
|
1698
|
+
:auth_names => auth_names,
|
1699
|
+
:return_type => return_type)
|
1700
|
+
|
1701
|
+
if @api_client.config.debugging
|
1702
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_update_keyword_bindings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1703
|
+
end
|
1704
|
+
return data, status_code, headers
|
1705
|
+
end
|
1706
|
+
# 更改查询的设置项
|
1707
|
+
# @param app 应用标识
|
1708
|
+
# @param query 记录编号
|
1709
|
+
# @param name 设置项名称
|
1710
|
+
# @param value 设置值
|
1711
|
+
# @param type 设置项类型
|
1712
|
+
# @param [Hash] opts the optional parameters
|
1713
|
+
# @return [BOOLEAN]
|
1714
|
+
def query_update_settings(app, query, name, value, type, opts = {})
|
1715
|
+
data, _status_code, _headers = query_update_settings_with_http_info(app, query, name, value, type, opts)
|
1716
|
+
data
|
1717
|
+
end
|
1718
|
+
|
1719
|
+
# 更改查询的设置项
|
1720
|
+
# @param app 应用标识
|
1721
|
+
# @param query 记录编号
|
1722
|
+
# @param name 设置项名称
|
1723
|
+
# @param value 设置值
|
1724
|
+
# @param type 设置项类型
|
1725
|
+
# @param [Hash] opts the optional parameters
|
1726
|
+
# @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
|
1727
|
+
def query_update_settings_with_http_info(app, query, name, value, type, opts = {})
|
1728
|
+
if @api_client.config.debugging
|
1729
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_update_settings ...'
|
1730
|
+
end
|
1731
|
+
# verify the required parameter 'app' is set
|
1732
|
+
if @api_client.config.client_side_validation && app.nil?
|
1733
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_update_settings"
|
1734
|
+
end
|
1735
|
+
# verify the required parameter 'query' is set
|
1736
|
+
if @api_client.config.client_side_validation && query.nil?
|
1737
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_update_settings"
|
1738
|
+
end
|
1739
|
+
# verify the required parameter 'name' is set
|
1740
|
+
if @api_client.config.client_side_validation && name.nil?
|
1741
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling QueriesApi.query_update_settings"
|
1742
|
+
end
|
1743
|
+
# verify the required parameter 'value' is set
|
1744
|
+
if @api_client.config.client_side_validation && value.nil?
|
1745
|
+
fail ArgumentError, "Missing the required parameter 'value' when calling QueriesApi.query_update_settings"
|
1746
|
+
end
|
1747
|
+
# verify the required parameter 'type' is set
|
1748
|
+
if @api_client.config.client_side_validation && type.nil?
|
1749
|
+
fail ArgumentError, "Missing the required parameter 'type' when calling QueriesApi.query_update_settings"
|
1750
|
+
end
|
1751
|
+
# verify enum value
|
1752
|
+
if @api_client.config.client_side_validation && !['number', 'bool', 'string'].include?(type)
|
1753
|
+
fail ArgumentError, "invalid value for 'type', must be one of number, bool, string"
|
1754
|
+
end
|
1755
|
+
# resource path
|
1756
|
+
local_var_path = '/queries/{app}/settings'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'query' + '}', query.to_s)
|
1757
|
+
|
1758
|
+
# query parameters
|
1759
|
+
query_params = opts[:query_params] || {}
|
1760
|
+
query_params[:'name'] = name
|
1761
|
+
query_params[:'value'] = value
|
1762
|
+
query_params[:'type'] = type
|
1763
|
+
|
1764
|
+
# header parameters
|
1765
|
+
header_params = opts[:header_params] || {}
|
1766
|
+
# HTTP header 'Accept' (if needed)
|
1767
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1768
|
+
|
1769
|
+
# form parameters
|
1770
|
+
form_params = opts[:form_params] || {}
|
1771
|
+
|
1772
|
+
# http body (model)
|
1773
|
+
post_body = opts[:body]
|
1774
|
+
|
1775
|
+
return_type = opts[:return_type] || 'BOOLEAN'
|
1776
|
+
|
1777
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
1778
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1779
|
+
:header_params => header_params,
|
1780
|
+
:query_params => query_params,
|
1781
|
+
:form_params => form_params,
|
1782
|
+
:body => post_body,
|
1783
|
+
:auth_names => auth_names,
|
1784
|
+
:return_type => return_type)
|
1785
|
+
|
1786
|
+
if @api_client.config.debugging
|
1787
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_update_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1788
|
+
end
|
1789
|
+
return data, status_code, headers
|
1790
|
+
end
|
1791
|
+
# 修改预定义查询变量
|
1792
|
+
# @param body
|
1793
|
+
# @param id 自定义查询变量编号
|
1794
|
+
# @param app 应用标识
|
1795
|
+
# @param [Hash] opts the optional parameters
|
1796
|
+
# @return [QueryVariableBean]
|
1797
|
+
def query_update_variable(body, id, app, opts = {})
|
1798
|
+
data, _status_code, _headers = query_update_variable_with_http_info(body, id, app, opts)
|
1799
|
+
data
|
1800
|
+
end
|
1801
|
+
|
1802
|
+
# 修改预定义查询变量
|
1803
|
+
# @param body
|
1804
|
+
# @param id 自定义查询变量编号
|
1805
|
+
# @param app 应用标识
|
1806
|
+
# @param [Hash] opts the optional parameters
|
1807
|
+
# @return [Array<(QueryVariableBean, Integer, Hash)>] QueryVariableBean data, response status code and response headers
|
1808
|
+
def query_update_variable_with_http_info(body, id, app, opts = {})
|
1809
|
+
if @api_client.config.debugging
|
1810
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_update_variable ...'
|
1811
|
+
end
|
1812
|
+
# verify the required parameter 'body' is set
|
1813
|
+
if @api_client.config.client_side_validation && body.nil?
|
1814
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling QueriesApi.query_update_variable"
|
1815
|
+
end
|
1816
|
+
# verify the required parameter 'id' is set
|
1817
|
+
if @api_client.config.client_side_validation && id.nil?
|
1818
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling QueriesApi.query_update_variable"
|
1819
|
+
end
|
1820
|
+
# verify the required parameter 'app' is set
|
1821
|
+
if @api_client.config.client_side_validation && app.nil?
|
1822
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_update_variable"
|
1823
|
+
end
|
1824
|
+
# resource path
|
1825
|
+
local_var_path = '/queries/{app}/variables'.sub('{' + 'app' + '}', app.to_s)
|
1826
|
+
|
1827
|
+
# query parameters
|
1828
|
+
query_params = opts[:query_params] || {}
|
1829
|
+
query_params[:'id'] = id
|
1830
|
+
|
1831
|
+
# header parameters
|
1832
|
+
header_params = opts[:header_params] || {}
|
1833
|
+
# HTTP header 'Accept' (if needed)
|
1834
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1835
|
+
# HTTP header 'Content-Type'
|
1836
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1837
|
+
|
1838
|
+
# form parameters
|
1839
|
+
form_params = opts[:form_params] || {}
|
1840
|
+
|
1841
|
+
# http body (model)
|
1842
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
1843
|
+
|
1844
|
+
return_type = opts[:return_type] || 'QueryVariableBean'
|
1845
|
+
|
1846
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
1847
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
1848
|
+
:header_params => header_params,
|
1849
|
+
:query_params => query_params,
|
1850
|
+
:form_params => form_params,
|
1851
|
+
:body => post_body,
|
1852
|
+
:auth_names => auth_names,
|
1853
|
+
:return_type => return_type)
|
1854
|
+
|
1855
|
+
if @api_client.config.debugging
|
1856
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_update_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1857
|
+
end
|
1858
|
+
return data, status_code, headers
|
1859
|
+
end
|
1860
|
+
# 获取搜索验证结果
|
1861
|
+
# @param app 应用标识
|
1862
|
+
# @param query 查询编号
|
1863
|
+
# @param [Hash] opts the optional parameters
|
1864
|
+
# @return [Object]
|
1865
|
+
def query_validate(app, query, opts = {})
|
1866
|
+
data, _status_code, _headers = query_validate_with_http_info(app, query, opts)
|
1867
|
+
data
|
1868
|
+
end
|
1869
|
+
|
1870
|
+
# 获取搜索验证结果
|
1871
|
+
# @param app 应用标识
|
1872
|
+
# @param query 查询编号
|
1873
|
+
# @param [Hash] opts the optional parameters
|
1874
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
1875
|
+
def query_validate_with_http_info(app, query, opts = {})
|
1876
|
+
if @api_client.config.debugging
|
1877
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_validate ...'
|
1878
|
+
end
|
1879
|
+
# verify the required parameter 'app' is set
|
1880
|
+
if @api_client.config.client_side_validation && app.nil?
|
1881
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_validate"
|
1882
|
+
end
|
1883
|
+
# verify the required parameter 'query' is set
|
1884
|
+
if @api_client.config.client_side_validation && query.nil?
|
1885
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_validate"
|
1886
|
+
end
|
1887
|
+
# resource path
|
1888
|
+
local_var_path = '/queries/{app}/validate'.sub('{' + 'app' + '}', app.to_s)
|
1889
|
+
|
1890
|
+
# query parameters
|
1891
|
+
query_params = opts[:query_params] || {}
|
1892
|
+
query_params[:'query'] = query
|
1893
|
+
|
1894
|
+
# header parameters
|
1895
|
+
header_params = opts[:header_params] || {}
|
1896
|
+
# HTTP header 'Accept' (if needed)
|
1897
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1898
|
+
|
1899
|
+
# form parameters
|
1900
|
+
form_params = opts[:form_params] || {}
|
1901
|
+
|
1902
|
+
# http body (model)
|
1903
|
+
post_body = opts[:body]
|
1904
|
+
|
1905
|
+
return_type = opts[:return_type] || 'Object'
|
1906
|
+
|
1907
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
1908
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1909
|
+
:header_params => header_params,
|
1910
|
+
:query_params => query_params,
|
1911
|
+
:form_params => form_params,
|
1912
|
+
:body => post_body,
|
1913
|
+
:auth_names => auth_names,
|
1914
|
+
:return_type => return_type)
|
1915
|
+
|
1916
|
+
if @api_client.config.debugging
|
1917
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_validate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1918
|
+
end
|
1919
|
+
return data, status_code, headers
|
1920
|
+
end
|
1921
|
+
# 验证聚合定义是否正确
|
1922
|
+
# @param body
|
1923
|
+
# @param query 查询编号
|
1924
|
+
# @param app 应用标识
|
1925
|
+
# @param [Hash] opts the optional parameters
|
1926
|
+
# @return [Object]
|
1927
|
+
def query_validate_aggregation(body, query, app, opts = {})
|
1928
|
+
data, _status_code, _headers = query_validate_aggregation_with_http_info(body, query, app, opts)
|
1929
|
+
data
|
1930
|
+
end
|
1931
|
+
|
1932
|
+
# 验证聚合定义是否正确
|
1933
|
+
# @param body
|
1934
|
+
# @param query 查询编号
|
1935
|
+
# @param app 应用标识
|
1936
|
+
# @param [Hash] opts the optional parameters
|
1937
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
1938
|
+
def query_validate_aggregation_with_http_info(body, query, app, opts = {})
|
1939
|
+
if @api_client.config.debugging
|
1940
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_validate_aggregation ...'
|
1941
|
+
end
|
1942
|
+
# verify the required parameter 'body' is set
|
1943
|
+
if @api_client.config.client_side_validation && body.nil?
|
1944
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling QueriesApi.query_validate_aggregation"
|
1945
|
+
end
|
1946
|
+
# verify the required parameter 'query' is set
|
1947
|
+
if @api_client.config.client_side_validation && query.nil?
|
1948
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_validate_aggregation"
|
1949
|
+
end
|
1950
|
+
# verify the required parameter 'app' is set
|
1951
|
+
if @api_client.config.client_side_validation && app.nil?
|
1952
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_validate_aggregation"
|
1953
|
+
end
|
1954
|
+
# resource path
|
1955
|
+
local_var_path = '/queries/{app}/validate-aggregation'.sub('{' + 'app' + '}', app.to_s)
|
1956
|
+
|
1957
|
+
# query parameters
|
1958
|
+
query_params = opts[:query_params] || {}
|
1959
|
+
query_params[:'query'] = query
|
1960
|
+
|
1961
|
+
# header parameters
|
1962
|
+
header_params = opts[:header_params] || {}
|
1963
|
+
# HTTP header 'Accept' (if needed)
|
1964
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1965
|
+
# HTTP header 'Content-Type'
|
1966
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1967
|
+
|
1968
|
+
# form parameters
|
1969
|
+
form_params = opts[:form_params] || {}
|
1970
|
+
|
1971
|
+
# http body (model)
|
1972
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
1973
|
+
|
1974
|
+
return_type = opts[:return_type] || 'Object'
|
1975
|
+
|
1976
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
1977
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
1978
|
+
:header_params => header_params,
|
1979
|
+
:query_params => query_params,
|
1980
|
+
:form_params => form_params,
|
1981
|
+
:body => post_body,
|
1982
|
+
:auth_names => auth_names,
|
1983
|
+
:return_type => return_type)
|
1984
|
+
|
1985
|
+
if @api_client.config.debugging
|
1986
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_validate_aggregation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1987
|
+
end
|
1988
|
+
return data, status_code, headers
|
1989
|
+
end
|
1990
|
+
# 验证聚合定义是否正确
|
1991
|
+
# @param body
|
1992
|
+
# @param query 查询编号
|
1993
|
+
# @param app 应用标识
|
1994
|
+
# @param [Hash] opts the optional parameters
|
1995
|
+
# @return [Object]
|
1996
|
+
def query_validate_query(body, query, app, opts = {})
|
1997
|
+
data, _status_code, _headers = query_validate_query_with_http_info(body, query, app, opts)
|
1998
|
+
data
|
1999
|
+
end
|
2000
|
+
|
2001
|
+
# 验证聚合定义是否正确
|
2002
|
+
# @param body
|
2003
|
+
# @param query 查询编号
|
2004
|
+
# @param app 应用标识
|
2005
|
+
# @param [Hash] opts the optional parameters
|
2006
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
2007
|
+
def query_validate_query_with_http_info(body, query, app, opts = {})
|
2008
|
+
if @api_client.config.debugging
|
2009
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_validate_query ...'
|
2010
|
+
end
|
2011
|
+
# verify the required parameter 'body' is set
|
2012
|
+
if @api_client.config.client_side_validation && body.nil?
|
2013
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling QueriesApi.query_validate_query"
|
2014
|
+
end
|
2015
|
+
# verify the required parameter 'query' is set
|
2016
|
+
if @api_client.config.client_side_validation && query.nil?
|
2017
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_validate_query"
|
2018
|
+
end
|
2019
|
+
# verify the required parameter 'app' is set
|
2020
|
+
if @api_client.config.client_side_validation && app.nil?
|
2021
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_validate_query"
|
2022
|
+
end
|
2023
|
+
# resource path
|
2024
|
+
local_var_path = '/queries/{app}/validate-query'.sub('{' + 'app' + '}', app.to_s)
|
2025
|
+
|
2026
|
+
# query parameters
|
2027
|
+
query_params = opts[:query_params] || {}
|
2028
|
+
query_params[:'query'] = query
|
2029
|
+
|
2030
|
+
# header parameters
|
2031
|
+
header_params = opts[:header_params] || {}
|
2032
|
+
# HTTP header 'Accept' (if needed)
|
2033
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2034
|
+
# HTTP header 'Content-Type'
|
2035
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
2036
|
+
|
2037
|
+
# form parameters
|
2038
|
+
form_params = opts[:form_params] || {}
|
2039
|
+
|
2040
|
+
# http body (model)
|
2041
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
2042
|
+
|
2043
|
+
return_type = opts[:return_type] || 'Object'
|
2044
|
+
|
2045
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
2046
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
2047
|
+
:header_params => header_params,
|
2048
|
+
:query_params => query_params,
|
2049
|
+
:form_params => form_params,
|
2050
|
+
:body => post_body,
|
2051
|
+
:auth_names => auth_names,
|
2052
|
+
:return_type => return_type)
|
2053
|
+
|
2054
|
+
if @api_client.config.debugging
|
2055
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_validate_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2056
|
+
end
|
2057
|
+
return data, status_code, headers
|
2058
|
+
end
|
2059
|
+
# 验证脚本字段是否正确
|
2060
|
+
# @param body
|
2061
|
+
# @param app 应用标识
|
2062
|
+
# @param [Hash] opts the optional parameters
|
2063
|
+
# @option opts [Integer] :query 查询编号, query 和 index 两个参数传一个即可
|
2064
|
+
# @option opts [Integer] :index 索引编号, query 和 index 两个参数传一个即可
|
2065
|
+
# @return [Object]
|
2066
|
+
def query_validate_script_field(body, app, opts = {})
|
2067
|
+
data, _status_code, _headers = query_validate_script_field_with_http_info(body, app, opts)
|
2068
|
+
data
|
2069
|
+
end
|
2070
|
+
|
2071
|
+
# 验证脚本字段是否正确
|
2072
|
+
# @param body
|
2073
|
+
# @param app 应用标识
|
2074
|
+
# @param [Hash] opts the optional parameters
|
2075
|
+
# @option opts [Integer] :query 查询编号, query 和 index 两个参数传一个即可
|
2076
|
+
# @option opts [Integer] :index 索引编号, query 和 index 两个参数传一个即可
|
2077
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
2078
|
+
def query_validate_script_field_with_http_info(body, app, opts = {})
|
2079
|
+
if @api_client.config.debugging
|
2080
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_validate_script_field ...'
|
2081
|
+
end
|
2082
|
+
# verify the required parameter 'body' is set
|
2083
|
+
if @api_client.config.client_side_validation && body.nil?
|
2084
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling QueriesApi.query_validate_script_field"
|
2085
|
+
end
|
2086
|
+
# verify the required parameter 'app' is set
|
2087
|
+
if @api_client.config.client_side_validation && app.nil?
|
2088
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_validate_script_field"
|
2089
|
+
end
|
2090
|
+
# resource path
|
2091
|
+
local_var_path = '/queries/{app}/validate-script-field'.sub('{' + 'app' + '}', app.to_s)
|
2092
|
+
|
2093
|
+
# query parameters
|
2094
|
+
query_params = opts[:query_params] || {}
|
2095
|
+
query_params[:'query'] = opts[:'query'] if !opts[:'query'].nil?
|
2096
|
+
query_params[:'index'] = opts[:'index'] if !opts[:'index'].nil?
|
2097
|
+
|
2098
|
+
# header parameters
|
2099
|
+
header_params = opts[:header_params] || {}
|
2100
|
+
# HTTP header 'Accept' (if needed)
|
2101
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2102
|
+
# HTTP header 'Content-Type'
|
2103
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
2104
|
+
|
2105
|
+
# form parameters
|
2106
|
+
form_params = opts[:form_params] || {}
|
2107
|
+
|
2108
|
+
# http body (model)
|
2109
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
2110
|
+
|
2111
|
+
return_type = opts[:return_type] || 'Object'
|
2112
|
+
|
2113
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
2114
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
2115
|
+
:header_params => header_params,
|
2116
|
+
:query_params => query_params,
|
2117
|
+
:form_params => form_params,
|
2118
|
+
:body => post_body,
|
2119
|
+
:auth_names => auth_names,
|
2120
|
+
:return_type => return_type)
|
2121
|
+
|
2122
|
+
if @api_client.config.debugging
|
2123
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_validate_script_field\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2124
|
+
end
|
2125
|
+
return data, status_code, headers
|
2126
|
+
end
|
2127
|
+
# 验证脚本字段是否正确
|
2128
|
+
# @param body
|
2129
|
+
# @param query 查询编号
|
2130
|
+
# @param app 应用标识
|
2131
|
+
# @param [Hash] opts the optional parameters
|
2132
|
+
# @return [Object]
|
2133
|
+
def query_validate_script_score(body, query, app, opts = {})
|
2134
|
+
data, _status_code, _headers = query_validate_script_score_with_http_info(body, query, app, opts)
|
2135
|
+
data
|
2136
|
+
end
|
2137
|
+
|
2138
|
+
# 验证脚本字段是否正确
|
2139
|
+
# @param body
|
2140
|
+
# @param query 查询编号
|
2141
|
+
# @param app 应用标识
|
2142
|
+
# @param [Hash] opts the optional parameters
|
2143
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
2144
|
+
def query_validate_script_score_with_http_info(body, query, app, opts = {})
|
2145
|
+
if @api_client.config.debugging
|
2146
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_validate_script_score ...'
|
2147
|
+
end
|
2148
|
+
# verify the required parameter 'body' is set
|
2149
|
+
if @api_client.config.client_side_validation && body.nil?
|
2150
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling QueriesApi.query_validate_script_score"
|
2151
|
+
end
|
2152
|
+
# verify the required parameter 'query' is set
|
2153
|
+
if @api_client.config.client_side_validation && query.nil?
|
2154
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_validate_script_score"
|
2155
|
+
end
|
2156
|
+
# verify the required parameter 'app' is set
|
2157
|
+
if @api_client.config.client_side_validation && app.nil?
|
2158
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_validate_script_score"
|
2159
|
+
end
|
2160
|
+
# resource path
|
2161
|
+
local_var_path = '/queries/{app}/validate-script-score'.sub('{' + 'app' + '}', app.to_s)
|
2162
|
+
|
2163
|
+
# query parameters
|
2164
|
+
query_params = opts[:query_params] || {}
|
2165
|
+
query_params[:'query'] = query
|
2166
|
+
|
2167
|
+
# header parameters
|
2168
|
+
header_params = opts[:header_params] || {}
|
2169
|
+
# HTTP header 'Accept' (if needed)
|
2170
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2171
|
+
# HTTP header 'Content-Type'
|
2172
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
2173
|
+
|
2174
|
+
# form parameters
|
2175
|
+
form_params = opts[:form_params] || {}
|
2176
|
+
|
2177
|
+
# http body (model)
|
2178
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
2179
|
+
|
2180
|
+
return_type = opts[:return_type] || 'Object'
|
2181
|
+
|
2182
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
2183
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
2184
|
+
:header_params => header_params,
|
2185
|
+
:query_params => query_params,
|
2186
|
+
:form_params => form_params,
|
2187
|
+
:body => post_body,
|
2188
|
+
:auth_names => auth_names,
|
2189
|
+
:return_type => return_type)
|
2190
|
+
|
2191
|
+
if @api_client.config.debugging
|
2192
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_validate_script_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2193
|
+
end
|
2194
|
+
return data, status_code, headers
|
2195
|
+
end
|
2196
|
+
# 验证建议是否正确
|
2197
|
+
# @param body
|
2198
|
+
# @param query 查询编号
|
2199
|
+
# @param app 应用标识
|
2200
|
+
# @param [Hash] opts the optional parameters
|
2201
|
+
# @return [Object]
|
2202
|
+
def query_validate_suggestion(body, query, app, opts = {})
|
2203
|
+
data, _status_code, _headers = query_validate_suggestion_with_http_info(body, query, app, opts)
|
2204
|
+
data
|
2205
|
+
end
|
2206
|
+
|
2207
|
+
# 验证建议是否正确
|
2208
|
+
# @param body
|
2209
|
+
# @param query 查询编号
|
2210
|
+
# @param app 应用标识
|
2211
|
+
# @param [Hash] opts the optional parameters
|
2212
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
2213
|
+
def query_validate_suggestion_with_http_info(body, query, app, opts = {})
|
2214
|
+
if @api_client.config.debugging
|
2215
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_validate_suggestion ...'
|
2216
|
+
end
|
2217
|
+
# verify the required parameter 'body' is set
|
2218
|
+
if @api_client.config.client_side_validation && body.nil?
|
2219
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling QueriesApi.query_validate_suggestion"
|
2220
|
+
end
|
2221
|
+
# verify the required parameter 'query' is set
|
2222
|
+
if @api_client.config.client_side_validation && query.nil?
|
2223
|
+
fail ArgumentError, "Missing the required parameter 'query' when calling QueriesApi.query_validate_suggestion"
|
2224
|
+
end
|
2225
|
+
# verify the required parameter 'app' is set
|
2226
|
+
if @api_client.config.client_side_validation && app.nil?
|
2227
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_validate_suggestion"
|
2228
|
+
end
|
2229
|
+
# resource path
|
2230
|
+
local_var_path = '/queries/{app}/validate-suggest'.sub('{' + 'app' + '}', app.to_s)
|
2231
|
+
|
2232
|
+
# query parameters
|
2233
|
+
query_params = opts[:query_params] || {}
|
2234
|
+
query_params[:'query'] = query
|
2235
|
+
|
2236
|
+
# header parameters
|
2237
|
+
header_params = opts[:header_params] || {}
|
2238
|
+
# HTTP header 'Accept' (if needed)
|
2239
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2240
|
+
# HTTP header 'Content-Type'
|
2241
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
2242
|
+
|
2243
|
+
# form parameters
|
2244
|
+
form_params = opts[:form_params] || {}
|
2245
|
+
|
2246
|
+
# http body (model)
|
2247
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
2248
|
+
|
2249
|
+
return_type = opts[:return_type] || 'Object'
|
2250
|
+
|
2251
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
2252
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
2253
|
+
:header_params => header_params,
|
2254
|
+
:query_params => query_params,
|
2255
|
+
:form_params => form_params,
|
2256
|
+
:body => post_body,
|
2257
|
+
:auth_names => auth_names,
|
2258
|
+
:return_type => return_type)
|
2259
|
+
|
2260
|
+
if @api_client.config.debugging
|
2261
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_validate_suggestion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2262
|
+
end
|
2263
|
+
return data, status_code, headers
|
2264
|
+
end
|
2265
|
+
# 获取应用的预定义查询变量列表
|
2266
|
+
# @param app 应用标识
|
2267
|
+
# @param [Hash] opts the optional parameters
|
2268
|
+
# @return [Array<QueryVariableBean>]
|
2269
|
+
def query_variables(app, opts = {})
|
2270
|
+
data, _status_code, _headers = query_variables_with_http_info(app, opts)
|
2271
|
+
data
|
2272
|
+
end
|
2273
|
+
|
2274
|
+
# 获取应用的预定义查询变量列表
|
2275
|
+
# @param app 应用标识
|
2276
|
+
# @param [Hash] opts the optional parameters
|
2277
|
+
# @return [Array<(Array<QueryVariableBean>, Integer, Hash)>] Array<QueryVariableBean> data, response status code and response headers
|
2278
|
+
def query_variables_with_http_info(app, opts = {})
|
2279
|
+
if @api_client.config.debugging
|
2280
|
+
@api_client.config.logger.debug 'Calling API: QueriesApi.query_variables ...'
|
2281
|
+
end
|
2282
|
+
# verify the required parameter 'app' is set
|
2283
|
+
if @api_client.config.client_side_validation && app.nil?
|
2284
|
+
fail ArgumentError, "Missing the required parameter 'app' when calling QueriesApi.query_variables"
|
2285
|
+
end
|
2286
|
+
# resource path
|
2287
|
+
local_var_path = '/queries/{app}/variables'.sub('{' + 'app' + '}', app.to_s)
|
2288
|
+
|
2289
|
+
# query parameters
|
2290
|
+
query_params = opts[:query_params] || {}
|
2291
|
+
|
2292
|
+
# header parameters
|
2293
|
+
header_params = opts[:header_params] || {}
|
2294
|
+
# HTTP header 'Accept' (if needed)
|
2295
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
2296
|
+
|
2297
|
+
# form parameters
|
2298
|
+
form_params = opts[:form_params] || {}
|
2299
|
+
|
2300
|
+
# http body (model)
|
2301
|
+
post_body = opts[:body]
|
2302
|
+
|
2303
|
+
return_type = opts[:return_type] || 'Array<QueryVariableBean>'
|
2304
|
+
|
2305
|
+
auth_names = opts[:auth_names] || ['TokenAuth']
|
2306
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
2307
|
+
:header_params => header_params,
|
2308
|
+
:query_params => query_params,
|
2309
|
+
:form_params => form_params,
|
2310
|
+
:body => post_body,
|
2311
|
+
:auth_names => auth_names,
|
2312
|
+
:return_type => return_type)
|
2313
|
+
|
2314
|
+
if @api_client.config.debugging
|
2315
|
+
@api_client.config.logger.debug "API called: QueriesApi#query_variables\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2316
|
+
end
|
2317
|
+
return data, status_code, headers
|
2318
|
+
end
|
2319
|
+
end
|
2320
|
+
end
|