-
Notifications
You must be signed in to change notification settings - Fork 191
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
[FEATURE] java-client should support FunctionScore with MatchTermQuery #655
Comments
any updates on this? this is a pretty big miss.... |
@jmontgomery-wbd AFAIK nobody is working on this, care to help? |
@dblock it seems like there is a lot of red tape around contributing. I just pulled and made an update and it seems to have fixed it: how can we properly test and merge that? |
@jmontgomery-wbd No tape. Just make a pull request with a passing test that wasn't passing before. |
Also looking for this feature. |
This feature was added in PR #880 and will be released in the upcoming version. Currently the change is available to consume in 2.10.0-SNAPSHOT. |
We are trying to use java-client 2.6.0 to build a function score query boosting specific hits on fields. Our query JSON looks like this:
unfortunately the java-client seems to support only specific function "kinds" for the functions block, like
random_score
orscript_score
. When we try to instantiate a query using the Java DSL that looks like the above snippet:an exception
org.opensearch.client.util.MissingRequiredPropertyException: Missing required property 'Builder.<variant kind>
will be thrown.What solution would you like?
Being able to build a function object combining a (match)query with a weight.
What alternatives have you considered?
We tried to disable API warnings using
ApiTypeHelper.DANGEROUS_disableRequiredPropertiesCheck(true)
but then serialization of the request in the search client fails.Therefore we're switching back to the REST highlevel client for now.
The text was updated successfully, but these errors were encountered: