Hi all!

Tired to find out the decision. I have some fields in my index that are 
not_analized. Suppose something like that in mappings:{
  "test-index-entities": {
    "mappings": {
      "testobject": {
        "properties": {
          "__location": {
            "type": "geo_point"
          },
          "activity_end": {
            "type": "long"
          },
          "activity_start": {
            "type": "long"
          },
          "attributes": {},
          "createdBy": {
            "type": "string",
            "index": "not_analyzed",
            "include_in_all": true
          }
        }
      }
    }
  }
}

Suppose I have value of "createdBy" attribute equals to "John Smith", and I 
want to query ALL documents that have ANY field equals to "John Smith". As 
I have field "createdBy" as not_analyzed, I should have one term "John 
Smith" in _all field.

But executing of match query:
{
    "match" : {
        "_all" : "John Smith"
    }
}

don't give results. I think that is because match query tokenizes query 
itself and search for "john" and "smith" terms instead of searching by 
not_tokenized "John Smith". In case of 
{
    "match" : {
        "createdBy" : "John Smith"
    }
}
all works fine, as ES finds in mappings that field is not tokenized.

Is there any way to specify in match query not to analyze query string? I 
see "analyzer" parameter in documentation 
 
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html,
 
tried "analyzer" : "none", "analyzer" : "not_analyzed", but it doesn't work.


-- 
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/c1d9ca4f-a0d3-4a50-a6a5-e3a59f972f5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to