Dear Community,
I’m trying to add partial searching on my site. I found “NGrams” [https://www.elastic.co/guide/en/elasticsearch/guide/current/ngrams-compound-words.html]. However, it doesn’t work.
Flowpack.SearchPlugin/Configuration/Settings.yaml
ElasticSearch:
indexes:
default:
searchindex:
analysis:
filter:
autocompleteFilter:
max_shingle_size: 5
min_shingle_size: 2
type: 'shingle'
trigrams_filter:
type: 'ngram'
min_gram: 3,
max_gram: 3
analyzer:
autocomplete:
filter: [ 'lowercase', 'autocompleteFilter' ]
char_filter: [ 'html_strip' ]
type: 'custom'
tokenizer: 'standard'
trigrams:
type: 'custom'
tokenizer: 'standard'
filter: ['lowercase', 'trigrams_filter']
and I add the analyser in my own NodeTypes.yaml (Packages/Sites/vendor/configuratin/NodeTypes.yaml)
properties:
'chapterDescription':
type: string
search:
fulltextExtractor: '${Indexing.extractHtmlTags(value)}'
elasticSearchMapping:
type: string
analyzer: trigrams
When I check the PUT Query, it looks like the same as the one in the Elasticsearch documentation. But the search doesn’t list anything when I search for >3 letters which are existing in chapterDescription.
Ex.: Grundstücksverkehrsgenehmigungszuständigkeitsübertragungsverordnung
Searchterm: verkehr
Result : 0, nothing.
Has anyone faced a problem like this or has a hint to solve the problem?
Thank you.
Best,
Kemal