Hi all - I have been going through the list of breaking changes in
1.0.0.RC1 and have a question regarding boosting of documents. I see
that "*Support
for document boosting via the _boost field has been removed from Lucene and
is deprecated in Elasticsearch as of v1.0.0.RC1. *"
Since I didnt really understand if there is a way one can still boost
documents during indexing, I wanted to check with this group. So if I
correctly understand there would be no mechanism to specify boost value of
the documents during indexing time. Is that right?
Judging by the commits, the functionality was only deprecated, not removed.
I believe there are many use cases where it makes sense to boost a document
at index time. The process only occurs once instead of every time during
queries.
That said, as the github issue says, document boosts are very confusing.
What it basically does behind the scenes is changing the field norm for
every field in the document. If you disable norms on a field, then that
document cannot boost on that field. The scoring becomes erratic and hard
to explain. You cannot disable length normalization on fields since that
would require the field norms, which are needed by the document boosts.
Overall it believe it is better to switch to custom scoring at query time.
Hi all - I have been going through the list of breaking changes in
1.0.0.RC1 and have a question regarding boosting of documents. I see that "*Support
for document boosting via the _boost field has been removed from Lucene and
is deprecated in Elasticsearch as of v1.0.0.RC1. *"
Since I didnt really understand if there is a way one can still boost
documents during indexing, I wanted to check with this group. So if I
correctly understand there would be no mechanism to specify boost value of
the documents during indexing time. Is that right?
You can continue to set up your document boost field (e.g. a numeric field
named "boost") with a document boost value, and use function score to use
it as a boost factor. That is, a function score script knows how to boost
correctly:
Thanks so much Jörg and Ivan.
Do you think I can use function score with any query? I use simple query
string query and wondering how this can be used along with that?
You can continue to set up your document boost field (e.g. a numeric field
named "boost") with a document boost value, and use function score to use
it as a boost factor. That is, a function score script knows how to boost
correctly:
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.