ElasticSearch mapping "not working" v1.1.1 -


i have been struggling on must simple syntax issue, trying make basic es mapping work. version 1.1.1

i have gist able create scratch:

https://gist.github.com/jrmadsen67/1fc5e296e26e7a5edae0

the mapping query is:

put /movies/movie/_mapping {    "movie": {       "properties": {          "director": {             "type": "multi_field",             "fields": {                 "director": {"type": "string"},                 "original": {"type" : "string", "index" : "not_analyzed"}             }          }       }    } } 

i ran:

curl localhost:9200/movies/movie/_mapping?pretty=true 

to confirm mapping there

the query:

post /movies/movie/_search {     "query": {         "constant_score": {             "filter": {                 "term": { "director.original": "francis ford coppola" }             }         }     } } 

does not hits. {"director": "francis"} works expected.

greatly appreciate set of eyes can tell me what's wrong this!

the current mapping match yours documents :

{     "movie" : {         "properties" : {             "director" : {                 "type" : "string"             },             "genres" : {                 "type" : "string"             },             "title" : {                 "type" : "string"             },             "year" : {                 "type" : "long"             }         }     } } 

to match yours mapping , query, documents should looking :

{     "director": {         "director": "francis ford coppola",         "original": "xxxxxx"     } } 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -