# ElasticSearch Index combinations of tokens with delimiter

**URL:** <https://discuss.elastic.co/t/elasticsearch-index-combinations-of-tokens-with-delimiter/206747>\
**Category:** Elasticsearch\
**Created:** [November 6, 2019, 8:43am UTC](https://discuss.elastic.co/t/elasticsearch-index-combinations-of-tokens-with-delimiter/206747 "2019-11-06T08:43:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankur\_singla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankur_singla/32/45612_2.png) [@ankur\_singla](https://discuss.elastic.co/u/ankur_singla)\
**Post date:** [November 6, 2019, 8:43am UTC](https://discuss.elastic.co/t/elasticsearch-index-combinations-of-tokens-with-delimiter/206747/1 "2019-11-06T08:43:56Z")

</div>

Hey,

I am using ES version 6.8.1 & I am indexing below document in index.

```
    PUT test/_doc/1 -->1
    {"test_data": "hello test 1"}

    PUT test/_doc/2 -->2
    {"test_data": "hello@test@aip"}

    PUT test/_doc/3 -->3
    {"test_data": "hello-test-aip"}

```

My search usecase is below:

```
GET test/_search
{
  "query": {
    "match": {
      "test_data": "hello@test"
    }
  }
}
Result: 2

GET test/_search
{
  "query": {
    "match": {
      "test_data": "hello-test"
    }
  }
}
Result: 3

GET test/_search
{
  "query": {
    "match": {
      "test_data": "hello test"
    }
  }
}
Result: 1,2,3

```

For this, my approach is to index the doucments as below:

```
hello-test => hello, test, hello-test,
hello@test@aip => hello, test, aip ,hello@test, test@aip, test@aip, hello@test@aip

```

I am searching filters/tokenizers to index the data in above format but none worked till now.  
Please help me if there is any filter/tokenizer to index data like this or any other way to achieve this use case.

---

<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:** [December 4, 2019, 8:43am UTC](https://discuss.elastic.co/t/elasticsearch-index-combinations-of-tokens-with-delimiter/206747/2 "2019-12-04T08:43:59Z")

</div>

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