# How to define custom comma analyzer for a field that will store Persian comma separated words?

**URL:** <https://discuss.elastic.co/t/how-to-define-custom-comma-analyzer-for-a-field-that-will-store-persian-comma-separated-words/56885>\
**Category:** Elasticsearch\
**Created:** [August 1, 2016, 11:18am UTC](https://discuss.elastic.co/t/how-to-define-custom-comma-analyzer-for-a-field-that-will-store-persian-comma-separated-words/56885 "2016-08-01T11:18:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mobasher-NetLinks](https://avatars.discourse-cdn.com/v4/letter/m/c77e96/32.png) [@Mobasher-NetLinks](https://discuss.elastic.co/u/Mobasher-NetLinks)\
**Post date:** [August 1, 2016, 11:18am UTC](https://discuss.elastic.co/t/how-to-define-custom-comma-analyzer-for-a-field-that-will-store-persian-comma-separated-words/56885/1 "2016-08-01T11:18:20Z")

</div>

up vote  
1  
down vote  
favorite  
I have defined one language per field inside a type, one of fields may contain comma separated words in different languages, for example i have a field named as `field1` for two language`field1.en` for english and `field1.pr` for Persian. So how to define custom comma analyzer for Persian ? We can define custom comma analyzer as bellow in normal :

```
"analysis" => [
   "tokenizer" => [
      "comma" => [
         "type" => "pattern",
         "pattern" => ","
      ]
   ],
   "analyzer" => [
      "comma" => [
         "type" => "custom",
         "tokenizer" => "comma"
      ]
   ]
]

```

Suppose in mapping i have a field that should store Persian comma separated words, now how i can define such an anylyzer ? or this comma analyzer will support Persian comma separated words ?

and one another question about elasticsearch, how to solve the problem with Pashto language ? I have not found any way in elastic to support analyzation of pashto texts.

---

<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:** [July 5, 2017, 10:31pm UTC](https://discuss.elastic.co/t/how-to-define-custom-comma-analyzer-for-a-field-that-will-store-persian-comma-separated-words/56885/2 "2017-07-05T22:31:15Z")

</div>


