# After applying custom analyzer not able to add data into the index

**URL:** <https://discuss.elastic.co/t/after-applying-custom-analyzer-not-able-to-add-data-into-the-index/104175>\
**Category:** Elasticsearch\
**Created:** [October 17, 2017, 5:33am UTC](https://discuss.elastic.co/t/after-applying-custom-analyzer-not-able-to-add-data-into-the-index/104175 "2017-10-17T05:33:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sidra\_89](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@sidra\_89](https://discuss.elastic.co/u/sidra_89)\
**Post date:** [October 17, 2017, 5:33am UTC](https://discuss.elastic.co/t/after-applying-custom-analyzer-not-able-to-add-data-into-the-index/104175/1 "2017-10-17T05:33:27Z")

</div>

i want to use ngram tokenizer for searching any substring in a word

this is custom analyzer code is

```
             "analysis" => [
                "analyzer" => [
                    "ngram_analyzer" => [
                        "type" => "custom",
                        "tokenizer" => "ngram_tokenizer",
                    ],
                ],
                "tokenizer" => [
                    "ngram_tokenizer" => [
                        "type" => "ngram",
                        "min_gram" => 3,
                        "max_gram" => 10,
                        "token_chars" => [
                            "letter",
                            "digit"
                        ]
                    ]
                ]
            ]

```

and these are the fields i want to apply analyzer on

```
       "mappings" => [

            "orders" => [

                "properties" => [

                    "account_title" => [
                        "type" => "string",
                        "analyzer" => "ngram_analyzer",
                    ],

                    "address1" => [
                        "type" => "string",
                        "analyzer" => "ngram_analyzer",
                    ],
                   "buyer_id" => [
                        "type" => "long"
                    ],
                   "cost" => [
                        "type" => "float"
                    ],

```

when i try to bulk import data into this elasticsearch index nothing is added .. without custom analyzer everything is working fine but with custom analyzer i am not getting any error and data is also not added into elasticsearch index.

[] == {} so ignore brackets ..

Thanks in advance

---

<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 14, 2017, 5:33am UTC](https://discuss.elastic.co/t/after-applying-custom-analyzer-not-able-to-add-data-into-the-index/104175/2 "2017-11-14T05:33:39Z")

</div>

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