# Can't index a special word in Nest!

**URL:** <https://discuss.elastic.co/t/cant-index-a-special-word-in-nest/266457>\
**Category:** Elasticsearch\
**Created:** [March 6, 2021, 9:49pm UTC](https://discuss.elastic.co/t/cant-index-a-special-word-in-nest/266457 "2021-03-06T21:49:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ehsan\_kabiri\_33](https://avatars.discourse-cdn.com/v4/letter/e/b77776/32.png) [@ehsan\_kabiri\_33](https://discuss.elastic.co/u/ehsan_kabiri_33)\
**Post date:** [March 6, 2021, 9:49pm UTC](https://discuss.elastic.co/t/cant-index-a-special-word-in-nest/266457/1 "2021-03-06T21:49:06Z")

</div>

Let's look at the built in analyzer named "persian"

```auto
      var analyzeResponse = client.Indices.Analyze(a => a
                     .Analyzer("persian")
                     .Text("word1 words2 ManyWord3 LargeWOrds4 SmallWord5 چهار")
                 );

```

These are some persian words, take it easy, but I do not know why there is a bug in word "چهار" but no problem in indexing other words !

Let's explain more: Suppose the persian analyzer Tokens some words in a sentence  
"Hello World I am noob", but it doesn't tokenize word "bye" !! but it Tokenize "Eye" or "bie" or "byk" or "eby" or "byed" . Now the same example in persian analyzer, it specially cant Index or Tokenize word "چهار" !! This word has four characters, changing only one of the characters or even changing the order of the characters in this special word, resolves the problem ☹  
"چهار' means "four" in persian. I have problem only and only with this word !! and no problem with many other thousands words !!

It took me one day to understand that my codes in [ASP.NET](http://ASP.NET) Core and Elastic Search Nest, for mapping and indexing are correct and I have problem only with this special word !!

[Elastic Search 7.10](https://i.ibb.co/SvpmpQF/Untitled.png)

I got a new point, when I add this special word in my synonym.txt list to be used by my custom analyzer, It can't start Elastic Search (Error is syntax error in synonym file)!! this word is bothering

---

<div class="post-metadata">

**Author:** ![ehsan\_kabiri\_33](https://avatars.discourse-cdn.com/v4/letter/e/b77776/32.png) [@ehsan\_kabiri\_33](https://discuss.elastic.co/u/ehsan_kabiri_33)\
**Post date:** [April 1, 2021, 8:35am UTC](https://discuss.elastic.co/t/cant-index-a-special-word-in-nest/266457/2 "2021-04-01T08:35:20Z")

</div>

There are some stop words in each built in stop words, the words . The list of Persian stop words

[Persian stop words list](https://github.com/apache/lucene/blob/main/lucene/analysis/common/src/resources/org/apache/lucene/analysis/fa/stopwords.txt)  
So I changed the default stop words to my favorite like this

```auto
                .Stop("my_stopword", st => st.StopWordsPath("analysis/stopwords.txt").IgnoreCase(true))

```

---

<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:** [April 29, 2021, 8:36am UTC](https://discuss.elastic.co/t/cant-index-a-special-word-in-nest/266457/3 "2021-04-29T08:36:11Z")

</div>

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