*... I build a little sample of what I do.* *My Test Synonyms file is (test.syn placed into my /etc/elasticsearch folder):*
aaa,bbb,ccc,ddd www,xxx,yyy,zzz eee,fff,ggg,hhh => 111 sss,ttt,uuu,vvv => 222 rrr => 333,444,555 *I created an index like so:* PUT /testindex?pretty { "settings": { "analysis": { "analyzer": { "myIndexAnalyzer": { "tokenizer": "standard", "filter": [ "lowercase", "mySynonymsFilter" ] }, "mySearchAnalyzer": { "tokenizer": "standard", "filter": [ "lowercase" ] } }, "filter": { "mySynonymsFilter": { "type": "synonym", "ignore_case": true, "synonyms_path": "test.syn" } } } }, "mappings": { "testitem": { "properties": { "title": { "type": "string", "index_analyzer": "myIndexAnalyzer", "search_analyzer": "mySearchAnalyzer" } } } } } *and added some data:* POST /_bulk { "index": { "_index": "testindex", "_type": "testitem", "_id": "1" }} { "title": "aaa test daten eintrag." } { "index": { "_index": "testindex", "_type": "testitem", "_id": "2" }} { "title": "bbb test daten eintrag." } { "index": { "_index": "testindex", "_type": "testitem", "_id": "3" }} { "title": "eee test daten eintrag." } *Testing the myIndexAnalyzer using* POST /testindex/_analyze?analyzer=myIndexAnalyzer&pretty {aaa test daten eintrag} *Results to:* { "tokens": [ { "token": "aaa", "start_offset": 1, "end_offset": 4, "type": "SYNONYM", "position": 1 }, { "token": "bbb", "start_offset": 1, "end_offset": 4, "type": "SYNONYM", "position": 1 }, { "token": "ccc", "start_offset": 1, "end_offset": 4, "type": "SYNONYM", "position": 1 }, { "token": "ddd", "start_offset": 1, "end_offset": 4, "type": "SYNONYM", "position": 1 }, { "token": "test", "start_offset": 5, "end_offset": 9, "type": "<ALPHANUM>", "position": 2 } ] } *Which to me seems to be fine.* Searching this index, i expected to find Record Ids 1 and 2 if I am searching for "aaa", "bbb", "ccc", "ddd". Which is my fault?? TIA Ste Phan -- 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/64e90076-f905-4490-bfe8-3b1607e5e98a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.