I have some docs with field 'title' and 'category'. I need to make a query
where i need to use 'match_query' on field 'title' and make all category
with word "other" appear after all other categorys.
I can made 2 querys, but I have too much docs, it not will done right.
I tried use 'bool' with boost and 'Custom Score Query' but i realy don´t
know if I can use for this purpose.
You could use use a function score query with a clause with a filter. That
filter could select things in the other field and multiply their score by
.01 or something. That'd mostly do what you want, I think.
I have some docs with field 'title' and 'category'. I need to make a query
where i need to use 'match_query' on field 'title' and make all category
with word "other" appear after all other categorys.
I can made 2 querys, but I have too much docs, it not will done right.
I tried use 'bool' with boost and 'Custom Score Query' but i realy don´t
know if I can use for this purpose.
You could also try a boosting query where the negative clause is a filtered
query matching the other field, I believe.
Nik
On Wed, Feb 5, 2014 at 1:29 PM, Nikolas Everett nik9000@gmail.com wrote:
You could use use a function score query with a clause with a filter.
That filter could select things in the other field and multiply their score
by .01 or something. That'd mostly do what you want, I think.
I have some docs with field 'title' and 'category'. I need to make a
query where i need to use 'match_query' on field 'title' and make all
category with word "other" appear after all other categorys.
I can made 2 querys, but I have too much docs, it not will done right.
I tried use 'bool' with boost and 'Custom Score Query' but i realy don´t
know if I can use for this purpose.
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.