include exclude filters from a elasticsearch query -
i new elasticsearch , want know if there way to include or exclude filters when preforming query. way write 1 query , not multiple queries.
yes can filter
tag within query
. like:
"query": { "bool": { "filter": [ { "term": { "color": "red" }}, { "term": { "brand": "gucci" }} ] } }
but might want have @ post filtering well. there differences in performance, when filtering within , out of query
. so handy. use filter context, when comes structured data.
Comments
Post a Comment