Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for boost in copy_to field #4972

Merged
merged 1 commit into from
Jan 31, 2014

Conversation

imotov
Copy link
Contributor

@imotov imotov commented Jan 31, 2014

Currently, boosting on copy_to is misleading and does not work as originally specified in #4520. Instead of boosting just the terms from the origin field, it boosts the whole destination field. If two fields copy_to a third field, one with a boost of 2 and another with a boost of 3, all the terms in the third field end up with a boost of 6. This was not the intention.

The alternative: to store the boost in a payload for every term, results in poor performance and inflexibility. Instead, users should either (1) query the common field AND the field that requires boosting, or (2) the multi_match query will soon be able to perform term-centric cross-field matching that will allow per-field boosting at query time (coming in 1.1).

@@ -370,6 +370,7 @@ public static boolean parseStore(String fieldName, String store) throws MapperPa
public static void parseCopyFields(String fieldName, Object propNode, AbstractFieldMapper.Builder builder) {
AbstractFieldMapper.CopyTo.Builder copyToBuilder = new AbstractFieldMapper.CopyTo.Builder();
if (isObject(propNode)) {
// To preserve backward compatibility with 1.0 RC1 mappings that were using object representation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we never released that so I think we should really remove that bw compat!

@s1monw
Copy link
Contributor

s1monw commented Jan 31, 2014

I had one small comment otherwise LGTM and push to all branches

Currently, boosting on `copy_to` is misleading and does not work as originally specified in elastic#4520. Instead of boosting just the terms from the origin field, it boosts the whole destination field.  If two fields copy_to a third field, one with a boost of 2 and another with a boost of 3, all the terms in the third field end up with a boost of 6.  This was not the intention.

  The alternative: to store the boost in a payload for every term, results in poor performance and inflexibility. Instead, users should either (1) query the common field AND the field that requires boosting, or (2) the multi_match query will soon be able to perform term-centric cross-field matching that will allow per-field boosting at query time (coming in 1.1).
@imotov imotov merged commit 90da268 into elastic:master Jan 31, 2014
@imotov imotov deleted the remove-boost-from-copy-to branch May 1, 2020 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants