Elasticsearch 5.3 java api appends ^1.0 as field weight for multi_match query, cannot override it

I have a query that does a multi_match search with custom field boost, but ES 5.3 java client also appends the default field weight.

So, I expect something to be like title^10, 10 is custom weight that I want, but I see the java client modifies it to title^10^1.0.

How can I remove ^1.0 or notify java code not to add default?

1 Like

It was resolved by using QueryBuilders.multiMatchQuery(searchTerm).fields(weightMap).

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.