I'm using a custom analyzer to stem possessive english. My custom analyzer seems to be ignored. As a sample search, we'll use "McDonald's".
What I used to create my analyzer: { "settings": { "analysis": { "analyzer": { "default": { "type": "custom", "tokenizer": "standard", "filter": [ "standard", "lowercase", "stop", "pos_english" ] } }, "filter": { "pos_english": { "type": "stemmer", "name": "possessive_english" } } } } } My mapping: { "item": { "_boost": { "name": "custom_boost", "null_value": 1 }, "properties": { "servings": { "enabled": false, "type": "object" }, "brand_name": { "index": "analyzed", "type": "string", "store": false }, "food_name": { "index": "analyzed", "type": "string", "store": false } } } } When I test the analyzer for the text 'McDonald's', it seems to work properly: { "tokens": [ { "token": "mcdonald", "start_offset": 0, "end_offset": 10, "type": "<ALPHANUM>", "position": 1 } ] } However, if I search for 'McDonald', I get no results. If I search for 'McDonald's' (with the possessive), I get my expected results. It seems like the analyzer is being ignored during the query. Search query that returns no results: { "query": { "match": { "_all": { "query": "mcdonalds" } } } } Any idea what I'm doing wrong? -- 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/93e3e3b3-1fc7-443d-970e-47bb43c757e4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.