Hi, i'm using es 5.0 rc1 and this is my use-case:
I have 2 custom analyzer that i want use only when i do a search but i don't want set them on field so:
mappings:
{ "settings": { "number_of_shards": 5, "number_of_replicas": 1, "index": { "refresh_interval": "1s", "mapper.dynamic": false, "analysis": { "filter": { "italian_elision": { "type": "elision", "articles": ["c","l","all","dall","dell","nell","sull","coll","pell","gl","agl","dagl","degl","negl","sugl","un","m","t","s","v","d"] }, "italian_stop": { "type": "stop", "stopwords": "_italian_" }, "italian_stemmer": { "type": "stemmer", "language": "italian" } }, "analyzer": { "an": { "type": "standard" }, "it": { "tokenizer": "standard", "filter":[ "italian_elision", "lowercase", "italian_stop", "italian_stemmer" ] }, "es":{...}, "en":{...} } } } }, "mappings": { "test": { "dynamic": "strict", "properties": { "iso": { "type": "keyword" }, "title": { "type": "keyword", "fields": { "it": { "type": "text", "analyzer": "it"} } }, "description": { "type": "keyword", "fields": { "an": { "type": "text", "analyzer": "an"} } } } } } }
query:
{ "query": { "bool":{"must":[ {"match": { "description":{ "query":"addetto", "analyzer": "it" }}}, {"match": { "iso": "IT" }} ]}}, "highlight": { "fields": { "iso": {}, "title": {} } } }
if i launch the query i have no result, in the previous release i can do this.
if i search with title.it its work but i my case i want a dynamic call for analyzer.
I don't know why this not work for me now. I'm wrong? or what?