Search - Match All Queries Flashcards
1
Q
Simple Match All Query
A
This returns all documents in the index without any additional parameters.
{
“query”: {
“match_all”: {}
}
}
2
Q
Match All Query with Boost
A
This example assigns a boost value to prioritize the relevance of the retrieved documents
{
“query”: {
“match_all”: {
“boost”: 1.5
}
}
}
3
Q
Using with Filters
A
Match_all can be combined with filters or aggregations to retrieve documents and then apply additional operations.
{
“query”: {
“bool”: {
“must”: {
“match_all”: {}
},
“filter”: {
“term”: { “status”: “active” }
}
}
}
}