I am currently indexing documents that represent a category page.
This documents have different fields like "category" and "brand".
Let's imagine a document A having category "Fashion" and no brand defined,
and a document B having category "Fashion" and brand "Adidas".
When I am querying for "Fashion" in the fields category and brand, I would
like the document A having a higher score then the document B.
Currently, the reverse is happening. How could I avoid it ?
When a document has only one field which is matching, I would like its
score beeing higher then an other document having the same field matching +
other fields defined.
I am not sure that my question is very clear so I have added some
information about my mapping, the query I am doing and the results I
am currently getting here :
I am currently indexing documents that represent a category page.
This documents have different fields like "category" and "brand".
Let's imagine a document A having category "Fashion" and no brand defined, and a document B having category "Fashion" and brand "Adidas".
When I am querying for "Fashion" in the fields category and brand, I would like the document A having a higher score then the document B.
Currently, the reverse is happening. How could I avoid it ?
When a document has only one field which is matching, I would like its score beeing higher then an other document having the same field matching + other fields defined.
I am not sure that my question is very clear so I have added some information about my mapping, the query I am doing and the results I am currently getting here : gist:5574793 · GitHub
I just tried it out but actually it is even worst. In the example I posted
on gist, my document having only "category":"Moda" without any other fields
is now in position 4.
On Tuesday, 14 May 2013 11:45:17 UTC+2, David Pilato wrote:
What happens if you set boost to 0.5 for brand field?
Just a side note: you can set boosting at query time instead of index time.
I am currently indexing documents that represent a category page.
This documents have different fields like "category" and "brand".
Let's imagine a document A having category "Fashion" and no brand defined,
and a document B having category "Fashion" and brand "Adidas".
When I am querying for "Fashion" in the fields category and brand, I would
like the document A having a higher score then the document B.
Currently, the reverse is happening. How could I avoid it ?
When a document has only one field which is matching, I would like its
score beeing higher then an other document having the same field matching +
other fields defined.
I am not sure that my question is very clear so I have added some
information about my mapping, the query I am doing and the results I
am currently getting here : gist:5574793 · GitHub
Thank you in advance !
Sebastian
--
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 elasticsearc...@googlegroups.com <javascript:>.
For more options, visit https://groups.google.com/groups/opt_out.
and give docs a boost that don't have a value in a certain field?
simon
On Tuesday, May 14, 2013 11:37:51 AM UTC+2, Sebastianpx wrote:
Hi !
I am currently indexing documents that represent a category page.
This documents have different fields like "category" and "brand".
Let's imagine a document A having category "Fashion" and no brand defined,
and a document B having category "Fashion" and brand "Adidas".
When I am querying for "Fashion" in the fields category and brand, I would
like the document A having a higher score then the document B.
Currently, the reverse is happening. How could I avoid it ?
When a document has only one field which is matching, I would like its
score beeing higher then an other document having the same field matching +
other fields defined.
I am not sure that my question is very clear so I have added some
information about my mapping, the query I am doing and the results I
am currently getting here : gist:5574793 · GitHub
Thanks for you answer. I gave it a try with boosting missing fields but
still I am not notally satisfied with the result.
If I have one document with category "Moda" and an other document with
category "Moda" and brand "Vera Moda", the score of the second document is
still higher then the first one.
My query looks like that:
and give docs a boost that don't have a value in a certain field?
simon
On Tuesday, May 14, 2013 11:37:51 AM UTC+2, Sebastianpx wrote:
Hi !
I am currently indexing documents that represent a category page.
This documents have different fields like "category" and "brand".
Let's imagine a document A having category "Fashion" and no brand
defined, and a document B having category "Fashion" and brand "Adidas".
When I am querying for "Fashion" in the fields category and brand, I
would like the document A having a higher score then the document B.
Currently, the reverse is happening. How could I avoid it ?
When a document has only one field which is matching, I would like its
score beeing higher then an other document having the same field matching +
other fields defined.
I am not sure that my question is very clear so I have added some
information about my mapping, the query I am doing and the results I
am currently getting here : gist:5574793 · GitHub
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.