Monday 2 November 2015

Elasticsearch: Filters

Filters are used to query on exact values (or) to answer yes/no queries. The results of filter are cached, and can be reused.

Elastic search come up with number of inbuilt filters like and, or, bool, match, term, terms etc., I will explain about the filters in detail in subsequent posts.

The results of the filters are cached by default, if you want to turn off caching, set “_cache” attribute to false.

Example
Below snippet turns off the cache for term filter

"term" : {   "user" : "ptr","_cache" : false}



Prevoius                                                 Next                                                 Home

No comments:

Post a Comment