OpenSearch/rest-api-spec/api/search.json

161 lines
6.0 KiB
JSON
Raw Normal View History

{
"search": {
"documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-search.html",
"methods": ["GET", "POST"],
"url": {
2013-05-27 17:25:24 -04:00
"path": "/_search",
2013-06-04 10:33:24 -04:00
"paths": ["/_search", "/{index}/_search", "/{index}/{type}/_search"],
"parts": {
"index": {
2013-05-27 17:25:24 -04:00
"type" : "list",
"description" : "A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices"
},
"type": {
2013-05-27 17:25:24 -04:00
"type" : "list",
"description" : "A comma-separated list of document types to search; leave empty to perform the operation on all types"
}
},
"params": {
2013-05-27 17:25:24 -04:00
"analyzer": {
"type" : "string",
"description" : "The analyzer to use for the query string"
},
"analyze_wildcard": {
2013-05-27 17:25:24 -04:00
"type" : "boolean",
"description" : "Specify whether wildcard and prefix queries should be analyzed (default: false)"
},
"default_operator": {
2013-05-27 17:25:24 -04:00
"type" : "enum",
"options" : ["AND","OR"],
"default" : "OR",
"description" : "The default operator for query string query (AND or OR)"
},
"df": {
2013-05-27 17:25:24 -04:00
"type" : "string",
"description" : "The field to use as default where no field prefix is given in the query string"
},
"explain": {
2013-05-27 17:25:24 -04:00
"type" : "boolean",
"description" : "Specify whether to return detailed information about score computation as part of a hit"
},
"fields": {
2013-05-27 17:25:24 -04:00
"type" : "list",
"description" : "A comma-separated list of fields to return as part of a hit"
},
"from": {
2013-05-27 17:25:24 -04:00
"type" : "number",
"description" : "Starting offset (default: 0)"
},
"ignore_unavailable": {
"type" : "boolean",
"description" : "Whether specified concrete indices should be ignored when unavailable (missing or closed)"
},
"allow_no_indices": {
"type" : "boolean",
"description" : "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)"
},
"expand_wildcards": {
"type" : "enum",
"options" : ["open","closed"],
"default" : "open",
"description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both."
},
"lenient": {
2013-05-27 17:25:24 -04:00
"type" : "boolean",
"description" : "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"
},
"lowercase_expanded_terms": {
2013-05-27 17:25:24 -04:00
"type" : "boolean",
"description" : "Specify whether query terms should be lowercased"
},
"preference": {
2013-05-27 17:25:24 -04:00
"type" : "string",
"description" : "Specify the node or shard the operation should be performed on (default: random)"
},
"q": {
2013-05-27 17:25:24 -04:00
"type" : "string",
"description" : "Query in the Lucene query string syntax"
},
"routing": {
"type" : "list",
"description" : "A comma-separated list of specific routing values"
},
"scroll": {
2013-05-27 17:25:24 -04:00
"type" : "duration",
"description" : "Specify how long a consistent view of the index should be maintained for scrolled search"
},
"search_type": {
"type" : "enum",
"options" : ["query_then_fetch", "query_and_fetch", "dfs_query_then_fetch", "dfs_query_and_fetch", "count", "scan"],
"description" : "Search operation type"
},
"size": {
2013-05-27 17:25:24 -04:00
"type" : "number",
"description" : "Number of hits to return (default: 10)"
},
"sort": {
2013-05-27 17:25:24 -04:00
"type" : "list",
"description" : "A comma-separated list of <field>:<direction> pairs"
},
"source": {
2013-05-27 17:25:24 -04:00
"type" : "string",
"description" : "The URL-encoded request definition using the Query DSL (instead of using request body)"
},
"_source": {
"type" : "list",
"description" : "True or false to return the _source field or not, or a list of fields to return"
},
"_source_exclude": {
"type" : "list",
"description" : "A list of fields to exclude from the returned _source field"
},
"_source_include": {
"type" : "list",
"description" : "A list of fields to extract and return from the _source field"
},
"stats": {
2013-05-27 17:25:24 -04:00
"type" : "list",
"description" : "Specific 'tag' of the request for logging and statistical purposes"
},
"suggest_field": {
2013-05-27 17:25:24 -04:00
"type" : "string",
"description" : "Specify which field to use for suggestions"
},
"suggest_mode": {
2013-05-27 17:25:24 -04:00
"type" : "enum",
"options" : ["missing", "popular", "always"],
"default" : "missing",
"description" : "Specify suggest mode"
},
"suggest_size": {
2013-05-27 17:25:24 -04:00
"type" : "number",
"description" : "How many suggestions to return in response"
},
"suggest_text": {
2013-05-27 17:25:24 -04:00
"type" : "text",
"description" : "The source text for which the suggestions should be returned"
},
"timeout": {
2013-05-27 17:25:24 -04:00
"type" : "time",
"description" : "Explicit operation timeout"
},
"track_scores": {
"type" : "boolean",
"description": "Whether to calculate and return scores even if they are not used for sorting"
},
"version": {
2013-05-27 17:25:24 -04:00
"type" : "boolean",
"description" : "Specify whether to return document version as part of a hit"
},
"query_cache": {
"type" : "boolean",
"description" : "Specify if query cache should be used for this request or not, defaults to index level setting"
}
}
},
2013-05-27 17:25:24 -04:00
"body": {
"description": "The search definition using the Query DSL"
}
}
}