# Elasicsearch- Indexing documents based on change of sequence of characters

**URL:** <https://discuss.elastic.co/t/elasicsearch-indexing-documents-based-on-change-of-sequence-of-characters/155112>\
**Category:** Elasticsearch\
**Created:** [November 2, 2018, 5:46am UTC](https://discuss.elastic.co/t/elasicsearch-indexing-documents-based-on-change-of-sequence-of-characters/155112 "2018-11-02T05:46:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikesh/32/86579_2.png) [@Nikesh](https://discuss.elastic.co/u/Nikesh)\
**Post date:** [November 2, 2018, 5:46am UTC](https://discuss.elastic.co/t/elasicsearch-indexing-documents-based-on-change-of-sequence-of-characters/155112/1 "2018-11-02T05:46:11Z")

</div>

I have a set of documents that has to be indexed in the following way:

1. fs$#56s as fs,$#,56,s
2. FSand-hgfh as fsand,-,hgfh

Is there a way to do so? Thank you!

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 2, 2018, 6:06am UTC](https://discuss.elastic.co/t/elasicsearch-indexing-documents-based-on-change-of-sequence-of-characters/155112/2 "2018-11-02T06:06:04Z")

</div>

You need to create your own analyser for that, have a read of this chapter - [https://www.elastic.co/guide/en/elasticsearch/reference/6.4/analysis.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.4/analysis.html)

---

<div class="post-metadata">

**Author:** ![Nikesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikesh/32/86579_2.png) [@Nikesh](https://discuss.elastic.co/u/Nikesh)\
**Post date:** [November 2, 2018, 6:11am UTC](https://discuss.elastic.co/t/elasicsearch-indexing-documents-based-on-change-of-sequence-of-characters/155112/3 "2018-11-02T06:11:11Z")

</div>

Thanks for the quick response.  
I did go through the chapter. I feel pattern tokenizer can be used to achieve this but I am unable to provide a proper pattern to token my document text.  
Is there any default pattern available?

---

<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:** [November 30, 2018, 6:11am UTC](https://discuss.elastic.co/t/elasicsearch-indexing-documents-based-on-change-of-sequence-of-characters/155112/4 "2018-11-30T06:11:12Z")

</div>

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