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

Having the original term in one field and the synonym in the other gets higher score than having the original term in both fields #43

Open
hrzafer opened this issue Aug 7, 2014 · 3 comments

Comments

@hrzafer
Copy link

hrzafer commented Aug 7, 2014

I've a single synonym pair:
laptop,dizüstü
And I have 2 documents with to fields:
<doc>
<field name="id">01</field>
<field name="title">laptop</field>
<field name="content">laptop</field>
</doc>
<doc>
<field name="id">02</field>
<field name="title">laptop</field>
<field name="content">dizüstü</field>
</doc>

When q=laptop, the document with id=02 always has a higher score. Even I give synonyms.originalBoost=10 or give different weights for the fields, it doesn't change. I thought since the it has the original term in both fields, its score would be higher. It seems having the original term in one field and the synonym in another field is a positive boost factor. Am I wrong?

Here are the parsedQuery value (tie=0.1):
+((title:laptop^1.5 | content:laptop)~0.1^1.2 ((+(title:dizüstü^1.5 | content:dizüstü)~0.1 () ()))) () ()

@hrzafer hrzafer changed the title Is this Scoring Correct? Having the original term in one field and the synonym in the other gets higher score than having the original term in both fields Aug 7, 2014
@nolanlawson
Copy link
Member

Yeah, this is a bug because the dismax calculations are applied separately (and dismax boosts docs containing the term in multiple fields). Would be hard to fix.

@blakeday
Copy link

blakeday commented May 9, 2016

This is effectively a showstopper for me (I haven't been able to come up with a workaround). Has anybody made any progress on this? Is it not possible to somehow modify the original clause such that dismax will pick the highest score overall instead of highest score out of all of the clauses including main and every synonym clause?

@blakeday
Copy link

blakeday commented May 9, 2016

Following up on previous comment: is there any way to use {!maxscore} to achieve my goal?

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

No branches or pull requests

3 participants