Hi,
Do I need to apply re-indexing if I update the keywords file and I need it to consider the updated file?
Best,
Maryam
Hi,
Do I need to apply re-indexing if I update the keywords file and I need it to consider the updated file?
Best,
Maryam
What is a keywords file?
Words that shouldn't be stemmed.
I used the keyword marker.
Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.
A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.
I don't have any problems with the code.
I have the following scenario:
I created my index with a keyword marker provided with a file containing a list of words (those that shouldn't be stemmed).
This file is updated regularly, so I was asking if I need to apply re-indexing so that the index considers the updated keywords file.
.Settings(ss => ss
.Analysis(an => an
.TokenFilters(tf => tf
.Stop("arabic_stop", ts => ts
.StopWords("_arabic_"))
.KeywordMarker("ar_keywords", km => km.KeywordsPath(keywordsFile))
.Stemmer("arabic_stemmer", st => st
.Language("arabic"))
)
.Analyzers(ns => ns
.Custom("ar_analyzer", cm => cm
.Tokenizer("standard")
.Filters("arabic_stop", "ar_keywords", "arabic_normalization", "arabic_stemmer")
)
.Custom("ar_standard", cm => cm
.Tokenizer("standard")
.Filters("arabic_normalization")
))
)
)
Ok. So you are talking about https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-keyword-marker-tokenfilter.html
So yes you need to reindex you data if you don't want those terms to be modified at index time.
Ok, thank you.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.