Hi,

I really don't know what's wrong, but I seem to be unable to find a way of 
querying array elements that contain multiple words with "AND" operator.

ES version: 1.3.*,
only the default standard analyser in use

A dummy document

POST /dummy/location
{
  "locationArray" : ["United Kindgom", "London"],
  "location" : "United Kingdom"
}

It's mapping 

GET /dummy/_mapping
{
   "dummy": {
      "mappings": {
         "location": {
            "properties": {
               "locationArray": {
                  "type": "string"
               },
               "location": {
                  "type": "string"
               }
            }
         }
      }
   }
}

Query that matches "location" field OK:

GET /dummy/_search
{
  "query": {
    "match": {
      "location" : {
        "query" : "United Kingdom",
        "operator" : "AND"
      }
    }
  }
}

*Problematic query that returns no results trying to match "locationArray" 
field:*

GET /dummy/_search
{
  "query": {
    "match": {
      "locationArray" : {
        "query" : "United Kingdom",
        "operator" : "AND"
      }
    }
  }
}

I'd really appreciate a hint - there must be something obvious i'm missing 
/ not know about when querying that array field.

Cheers




-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/4179ca35-e376-471a-9228-1bf69b0bf550%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to