Is it possible to have a percolate query return a score for how well each
percolate query matches the document and return extra fields from the
percolate query as part of the results? Given the percolate query below:
Unfortunately neither is possible at the moment. The score part that you
ask is interesting in which I could see some interesting applications. For
the second one, you'll probably just need to do an _mget or second search
to retrieve extra metadata from the percolator queries. There is a scoring
capability in the percolator in ES 1.0 but it is not the way you describe.
It simply works by you supplying a query along with the percolate call and
then a score will be computed based on the relevance of the query against
the percolator queries metadata.
I was afraid of that. That lines up with all the information I've seen in
the documentation. I was just hoping there was something I was missing.
I've already done what you've suggested for fetching the fields. I guess I
could attempt to score the results myself.
Unfortunately neither is possible at the moment. The score part that you
ask is interesting in which I could see some interesting applications. For
the second one, you'll probably just need to do an _mget or second search
to retrieve extra metadata from the percolator queries. There is a scoring
capability in the percolator in ES 1.0 but it is not the way you describe.
It simply works by you supplying a query along with the percolate call and
then a score will be computed based on the relevance of the query against
the percolator queries metadata.
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.