Search request format¶
Search request format is similar to existing Lucene-based search engines:
{
"query": {
"match_all": {}
},
"fields": ["title", "desc"],
"size": 10,
"aggs": {
"color_counts": {"term": {"field": "color"}}
},
"filters": {
"include": {"term": {"field": "category", "value": "pants"}}
}
}
Where fields are:
query
: required, a search query operator. See Query DSL for all supported values.fields
: optional (default: all stored fields), which document fields to return in the response payload. Note that these fields should be marked asstore: true
in index mapping.size
: optional (default: 10), number of documents to returnaggs
: optional, facet aggregations, see Facets for more examples.filters
: optional, include/exclude filters to select a sub-set of documents for searching.