This example has nothing in common with your data! That said, you need to apply the mapping before indexing any document!
-- David Pilato | Technical Advocate | Elasticsearch.com @dadoonet | @elasticsearchfr Le 11 mars 2014 à 14:47:34, Subhadip Bagui (i.ba...@gmail.com) a écrit: Hi David, I have done like below for a test sample. 1. deleted index. 2. create index by following curl -XPUT "http://localhost:9200/movies/" -d '{ "index": {"_index": "movies", "_type": "movie", "_id": "1"}}' 3. creating doc curl -XPUT "http://localhost:9200/movies/movie/1" -d '{ "title": "The Godfather", "director": "Francis Ford Coppola", "year": 1972, "genres": ["Crime", "Drama"] }' 4. creating mapping curl -XPUT "http://localhost:9200/movies/movie/_mapping" -d '{ "movie": { "properties": { "director": { "type": "multi_field", "fields": { "director": {"type": "string"}, "original": {"type" : "string", "index" : "not_analyzed"} } } } } }' 5. query curl -XPOST "http://localhost:9200/_search" -d' { "query": { "constant_score": { "filter": { "term": { "director.original": "Francis Ford Coppola" } } } } }' Please let me know what am I missing. I checked for template. -Subhadip -- 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 elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/7a736c32-34e7-4e7d-8a3d-c431c5c42175%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.531f16b4.75a2a8d4.b095%40MacBook-Air-de-David.local. For more options, visit https://groups.google.com/d/optout.