-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Change long to float for Weight #1087
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
Conversation
ty for bringing this to our attention @virgilxie this PR has some issues though The following unit tests fail:
We can't change the property in 1.x releases since it would break backwards compatibility this PR will need to target our and lastly can you sign the elasticsearch cla: http://www.elasticsearch.org/contributor-agreement/ so that we may pull your bits in ? 😄 Please let us know if you would like to take this on or would like us to do so (we'll still credit you in our changelog) |
Hi Martijn, Thank you so much for your reply. I have signed CLA. About the test (FunctionScoreQueryWithJustWeight and etc) : I don't really understand why it's will break the backwards compatibility Thank you for your great work on nest client! 2014-12-05 6:09 GMT-08:00 Martijn Laarman [email protected]:
Fei (Virgil) Xie Software Engineer @zazzle Alumni, Tsinghua University, Carnegie Mellon University |
Enable Functions in FunctionScoreQueryDescriptor accept FunctionScoreFunction<T>[] functions. So when you add multiple functions with different filters, you don't need to have FieldValueFactor for each of them. In the other words, I think we can only make the following query with this modification. Let me know if I was wrong. "query": { "function_score": { "filter": { "term": { "city": "Barcelona" } }, "functions": [ { "field_value_factor": { "field": "score_US" } }, { "filter": { "term": { "features": "wifi" }}, "weight": 1 }, { "filter": { "term": { "features": "garden" }}, "weight": 1 }, { "filter": { "term": { "features": "pool" }}, "weight": 2 } ], "score_mode": "sum", } }
@virgilxie it's not a backwards compatibility issue with Elasticsearch, but with NEST. By changing the property from |
Elasitcsearch itself accepts float type weight