How to ignore apostrophes in elasticsearch?
Let's say that I'm looking for a string Paul's
. I want to be able to match it when sending terms like: pauls
or paul's
.
This is how config for my index look like: (I've tried to do this with a custom analyzer, but it doesn't work):
{
settings: {
analysis: {
analyzer: {
my_analyzer: {
tokenizer: 'standard',
filter: ['standard', 'lowercase', 'my_stemmer'],
},
},
filter: {
my_stemmer: {
type: 'stemmer',
name: 'possessive_english',
},
},
},
},
mappings: {
my_type: {
properties: {
description: { type: 'text' },
title: { type: 'text', analyzer: 'my_analyzer' },
},
},
}