Closed
Description
The current queryString requires to define the defaultField in order to run the query against a default field. Running the same query string against several "default" fields can be done by combining them either with bool or disMax queries, but its cumbersome.
queryString should support providing a "fields" field, where a list of fields the query will run against will be provided. An option to choose if the query will be combined using disMax or bool should be a simple flag. A tieBreaker field allowed when using disMax.
Sample 1:
{
queryString : {
fields : ["content", "name"],
useDisMax : false,
query: "test"
}
}
Sample 2:
{
queryString : {
fields : ["content", "name"],
useDisMax : true,
query: "test"
}
}
Boosting per field should be allowed, for example:
{
queryString : {
fields : ["content^1.4", "name"],
query: "test"
}
}