Query_string search within nested types

Hi,

We recently introduced nested type to our document structure and found that it has some restriction with the query_string search type, which we use extensively.

The search documentation says that:

"Avoid using the query_string query for nested documents
query_string searches do not return nested documents. To search nested documents, use the nested query."

But, is it ok to use "query_string" inside the "nested" query ?

So something like:

{
  "query": {
   "nested": {
      "path":  "nestedfield",
      "query": {
        "bool": {
           "should": [{
              "query_string": {
                  "query": "(textA OR textB)"        
                }
	   }]
    }
  }
}

Thanks in advance !

1 Like

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