How to make some docs less relevant on search

Hello all,

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.

Anyone know how i can make it?

Thanks for any help and sory for my poor english.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/50c49da1-8d02-4c7d-9efc-a77a0001dea8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

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.

Nik

On Wed, Feb 5, 2014 at 1:25 PM, Tiago Rodrigues tiago_tk21@hotmail.comwrote:

Hello all,

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.

Anyone know how i can make it?

Thanks for any help and sory for my poor english.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/50c49da1-8d02-4c7d-9efc-a77a0001dea8%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAPmjWd0LxfpffcsEZyo3nbu0jeG42%2B2hGLCtBJn8TYue9R-cNA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

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.

Nik

On Wed, Feb 5, 2014 at 1:25 PM, Tiago Rodrigues tiago_tk21@hotmail.comwrote:

Hello all,

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.

Anyone know how i can make it?

Thanks for any help and sory for my poor english.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/50c49da1-8d02-4c7d-9efc-a77a0001dea8%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAPmjWd3y%3DEOCBkPFLoZQ5AEzz6_Y%3Do%2BG3_v6owV7fMS7rx3MeA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks, but, when I use the functions score, he returns only the docs who
have 'other' in category field.

I realy don´t understand the function_score.

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.

Nik

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2def5e7b-7a8c-4d53-a58a-c60d106f8e3e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Oh, I trying it now, and appear to be ok.

I will return if some think not whas right.

Em quarta-feira, 5 de fevereiro de 2014 16h32min33s UTC-2, Nikolas Everett
escreveu:

You could also try a boosting query where the negative clause is a
filtered query matching the other field, I believe.

Nik

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2dc6b218-3f74-4a20-b25b-9654c79ee3fc%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks Nikolas !

boosting query solves my problem.

Em quarta-feira, 5 de fevereiro de 2014 16h32min33s UTC-2, Nikolas Everett
escreveu:

You could also try a boosting query where the negative clause is a
filtered query matching the other field, I believe.

Nik

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d3b1ee83-3d11-4ea7-83e2-d96eb3d91a98%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.