# Re-index after keywords file changed

**URL:** <https://discuss.elastic.co/t/re-index-after-keywords-file-changed/176574>\
**Category:** Elasticsearch\
**Created:** [April 12, 2019, 8:25am UTC](https://discuss.elastic.co/t/re-index-after-keywords-file-changed/176574 "2019-04-12T08:25:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![maryam\_abdullah](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@maryam\_abdullah](https://discuss.elastic.co/u/maryam_abdullah)\
**Post date:** [April 12, 2019, 8:25am UTC](https://discuss.elastic.co/t/re-index-after-keywords-file-changed/176574/1 "2019-04-12T08:25:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 12, 2019, 9:22am UTC](https://discuss.elastic.co/t/re-index-after-keywords-file-changed/176574/2 "2019-04-12T09:22:33Z")

</div>

What is a keywords file?

---

<div class="post-metadata">

**Author:** ![maryam\_abdullah](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@maryam\_abdullah](https://discuss.elastic.co/u/maryam_abdullah)\
**Post date:** [April 12, 2019, 9:29am UTC](https://discuss.elastic.co/t/re-index-after-keywords-file-changed/176574/3 "2019-04-12T09:29:55Z")

</div>

Words that shouldn't be stemmed.  
I used the keyword marker.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 12, 2019, 9:34am UTC](https://discuss.elastic.co/t/re-index-after-keywords-file-changed/176574/4 "2019-04-12T09:34:16Z")

</div>

Could you provide a full recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). 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.

---

<div class="post-metadata">

**Author:** ![maryam\_abdullah](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@maryam\_abdullah](https://discuss.elastic.co/u/maryam_abdullah)\
**Post date:** [April 12, 2019, 9:45am UTC](https://discuss.elastic.co/t/re-index-after-keywords-file-changed/176574/5 "2019-04-12T09:45:40Z")

</div>

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")
                            ))
                    )
                )
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 12, 2019, 10:01am UTC](https://discuss.elastic.co/t/re-index-after-keywords-file-changed/176574/6 "2019-04-12T10:01:12Z")

</div>

Ok. So you are talking about [https://www.elastic.co/guide/en/elasticsearch/reference/current/analysis-keyword-marker-tokenfilter.html](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.

---

<div class="post-metadata">

**Author:** ![maryam\_abdullah](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@maryam\_abdullah](https://discuss.elastic.co/u/maryam_abdullah)\
**Post date:** [April 12, 2019, 10:07am UTC](https://discuss.elastic.co/t/re-index-after-keywords-file-changed/176574/7 "2019-04-12T10:07:43Z")

</div>

Ok, thank you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 10, 2019, 10:07am UTC](https://discuss.elastic.co/t/re-index-after-keywords-file-changed/176574/8 "2019-05-10T10:07:43Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
