Query/Filtering on Complex Document


#1

I am newer to ElasticSearch so forgive me as I've exhausted my searches within the Reference Guide and elsewhere.

Here is an example of my current document:

{
     name: "",
     id: "",
     addresses: [{
         address_type: "",
         addr1: "",
         city: "",
         state: "",
         postal: ""
     }],
     jobs: [{
         jobtype: "",
         title: "",
         location: ""
     }]
 }

I need to query the entire document and return everything except for addresses where address_type doesn't equal a specific value.

I know that exclude be leveraged, but not dynamically as is the case here.

Any help, insight, pseudo code for this type of query would be appreciated.


(system) #2