I interpreted the percolator filter feature shown here http://www.elasticsearch.org/guide/reference/api/percolate.htmlto
mean that I could give percolators additional terms and then supply a query
on those terms when percolating a document. This would first retrieve the
subset of percolators that match the query, then percolate the document
against that set. In my example https://gist.github.com/2632887 I create
two percolators with a term called 'color', set to 'blue' for both. Each
percolator has a query on a field called 'sport', one for the word
'sailing', the other for the word 'tennis'. If I percolate a document with
the sport field set to 'tennis', ES correctly returns a match on the tennis
percolator alone. If however I percolate the same doc with an additional
query to filter the percolators, a match for both percolators is returned.
I've found this to occur in both 0.19.2 and 0.19.3. Is my understanding of
this feature correct? If so what is wrong with my application of it, or is
this a bug?
I interpreted the percolator filter feature shown here http://www.elasticsearch.org/guide/reference/api/percolate.htmlto
mean that I could give percolators additional terms and then supply a query
on those terms when percolating a document. This would first retrieve the
subset of percolators that match the query, then percolate the document
against that set. In my example https://gist.github.com/2632887 I
create two percolators with a term called 'color', set to 'blue' for both.
Each percolator has a query on a field called 'sport', one for the word
'sailing', the other for the word 'tennis'. If I percolate a document with
the sport field set to 'tennis', ES correctly returns a match on the tennis
percolator alone. If however I percolate the same doc with an additional
query to filter the percolators, a match for both percolators is returned.
I've found this to occur in both 0.19.2 and 0.19.3. Is my understanding of
this feature correct? If so what is wrong with my application of it, or is
this a bug?
I'm having some more issues with this bug under a more constrained
environment. If you run my gist here https://gist.github.com/2632887, except
the last line which deletes the index, but making sure all the lines before
it are executed in a single time interval, on a fresh ES 19.4 instance with
no data or logs folders, you get a strange result. The last percolation
request, which uses percolator filtering, does not match. If you re-run it
a second later it matches correctly. If you delete the index and then run
the script again, in a single time interval, the last percolator does
match. I stumbled on this one when some of my unit tests worked when I had
a break-point, but failed without it...
I'm having some more issues with this bug under a more constrained
environment. If you run my gist here https://gist.github.com/2632887, except
the last line which deletes the index, but making sure all the lines before
it are executed in a single time interval, on a fresh ES 19.4 instance with
no data or logs folders, you get a strange result. The last percolation
request, which uses percolator filtering, does not match. If you re-run it
a second later it matches correctly. If you delete the index and then run
the script again, in a single time interval, the last percolator does
match. I stumbled on this one when some of my unit tests worked when I had
a break-point, but failed without it...
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.