How to build java api to query against multiple fields with some fields with boost

I'm trying to upgrade from ES 2.2.0 to 5.5.0. Before we used build prepareSearch with querystring and fields as jsonstring to query as setQuery(jsonstring), now setQuery(QueryBuilders) is only supported. Can someone help how to build query string to query against multiple fields with boost values for some fields alone.

Below is the query I need to build with queryBuilders.

{ "query_string" : { "query" : "*", "fields" : ["name^5.0","description"], "boost" : 1.0, "use_dis_max" : true, "default_operator" : "and", "allow_leading_wildcard" : false, "analyzer" : "standard" } }

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