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

Matches all docs if bf (Boost Function) present #65

Closed
janhoy opened this issue Aug 26, 2016 · 5 comments
Closed

Matches all docs if bf (Boost Function) present #65

janhoy opened this issue Aug 26, 2016 · 5 comments
Labels

Comments

@janhoy
Copy link
Contributor

janhoy commented Aug 26, 2016

If your edismax query involves bf parameter, and the query matches a synonym, this plugin seems to generate a query which always returns all documents. Simply adding e.g. bf=last_modified to any of the unit tests will reveal the bug. The constructed parsed-query looks something like this (assuming query restskatt being expanded with synonym baksmell, and bf=SearchRank^10:

(
  DisjunctionMaxQuery(((PageName:restskatt)^30.0))^1.0 
  ((+DisjunctionMaxQuery(((PageName:baksmell)^30.0)))/no_coord^1.0)
) 
FunctionQuery(float(SearchRank))^10.0"
@Mykezero
Copy link
Contributor

Yeah, I've been having this problem as well with Solr 6.0 and the 5.0.4 version of the plugin; I wasn't sure what was causing it. Thanks for working on this @janhoy !

@janhoy
Copy link
Contributor Author

janhoy commented Aug 28, 2016

Would you have a chance to test my PR and see if it works for you? If so, I'll commit it..

@Mykezero
Copy link
Contributor

Absolutely. I'll check it out tomorrow morning and give it a test run.

@Mykezero
Copy link
Contributor

Everything seems to be working correctly. I haven't come across any query yet that throws it off. I think it may be good to go!

@janhoy janhoy closed this as completed in 22dfcbb Sep 14, 2016
@Mykezero
Copy link
Contributor

Thanks @janhoy for the work you put into this. I really appreciate it! 😺

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

2 participants