Limit query to field

I have an index with document and organizations who published this documents. One document can have multiple organizations.

"organization" : [
"Carnegie Mellon Univ, Dept Mat Sci & Engn",
"US Steel Corp, US Steel Res & Technol Ctr",
"Alcoa Technical Ctr, Div Mat Sci"

"query_string": {
"query": "Technical Res",
"default_operator": "AND",
"fields": [

My problem is that query_string finds documents where the terms are distributed over all organizations.
How can I limit the search to only find the documents where all terms are in the same "subfield"?


Yes, this is a problem that nested document can solve. You can store each orgnization as a independent child document and you query_string can be limited to each independent child document.

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