1

If documents are indexed on tags and 100,000 users are interested in documents with specific tags, will percolator evaluate all 100,000 queries or just those that are querying on tags that are present in a given document?

teslan
  • 71
  • 4
  • possible duplicate of [What does percolator mean/do in elasticsearch?](http://stackoverflow.com/questions/21536599/what-does-percolator-mean-do-in-elasticsearch) – Paul Sweatte Aug 25 '15 at 15:57

1 Answers1

0

As the docs say:

After this a special query is build based on the terms in the in-memory index that select candidate percolator queries based on their indexed query terms. These queries are then evaluated by the in-memory index if they actually match.

The selecting of candidate percolator queries matches is an important performance optimization during the execution of the percolate query as it can significantly reduce the number of candidate matches the in-memory index needs to evaluate.

It means that all queries which match by specific field present in the documents you want to percolate will be run. If you have all 100 000 queries with field tag, then yes, all 100 000 queries will be run, as it must check if the tags you are interested in are present in that array (if it is array).

Community
  • 1
  • 1
crollywood
  • 523
  • 1
  • 6
  • 17