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

Multi-word synonyms not been expandend as expected when using extra terms in the query #16

Closed
rmerizalde opened this issue Apr 13, 2013 · 2 comments
Labels

Comments

@rmerizalde
Copy link

For example, lets take the following synonym definition:

back pack=>backpack

If I search for back pack the parser expands the query as expected

+((((text:back) (text:pack))~2) (((+(text:backpack^1.2)))^1.2))

However, I used another word in my query it doesn't:

+(((text:north) (text:face) (text:back) (text:pack))~4)

I have a fix that does what I'm expecting to:

+((((text:north) (text:face) (text:back) (text:pack))~4) (((+(((text:north) (text:face) (text:backpack))~3)))^1.2))

Or "north face back pack red" returns

+((((text:north) (text:face) (text:back) (text:pack) (text:red))~5) (((+(((text:north) (text:face) (text:backpack) (text:red))~4)))^1.2))

rmerizalde added a commit to rmerizalde/hon-lucene-synonyms that referenced this issue Apr 13, 2013
@OkkeKlein
Copy link

Seems to work quite nicely. Thanx for the contribution.

@nolanlawson
Copy link
Member

Thanks for bringing this to my attention. Your fix works, but it doesn't keep the performance improvements, so I rewrote it a bit instead of merging. Good find!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants