Text query with multi fields

Hi,

I am trying to create a text query, but I want the "multi field" part of
the query string. i.e. I want :

{
"query_string" : {
"fields" : ["content", "name^5"],
"query" : "foo bar baz",
}
}

But using the "text" query instead of "query_string", because query_string
chokes on simple stuff (like searching for $('#bar')). I still want to keep
the multiple fields, and give them different boost at query time. Any idea
on how to do that?

You can wrap several text queries either with dismax or with bool query.

On Wed, Dec 21, 2011 at 3:25 AM, Ciryus ciryus432@gmail.com wrote:

Hi,

I am trying to create a text query, but I want the "multi field" part of
the query string. i.e. I want :

{

"query_string" : {

    "fields" : ["content", "name^5"],

    "query" : "foo bar baz",
}

}

But using the "text" query instead of "query_string", because query_string
chokes on simple stuff (like searching for $('#bar')). I still want to keep
the multiple fields, and give them different boost at query time. Any idea
on how to do that?