# Not able to import data into index after applying custom analyzer and proper mapping \[Re-Posting-it\]

**URL:** <https://discuss.elastic.co/t/not-able-to-import-data-into-index-after-applying-custom-analyzer-and-proper-mapping-re-posting-it/104656>\
**Category:** Elasticsearch\
**Created:** [October 20, 2017, 6:42am UTC](https://discuss.elastic.co/t/not-able-to-import-data-into-index-after-applying-custom-analyzer-and-proper-mapping-re-posting-it/104656 "2017-10-20T06:42:06Z")\
**Posts on this page:** 4\
**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 20, 2017, 6:42am UTC](https://discuss.elastic.co/t/not-able-to-import-data-into-index-after-applying-custom-analyzer-and-proper-mapping-re-posting-it/104656/1 "2017-10-20T06:42:06Z")

</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:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 23, 2017, 8:40am UTC](https://discuss.elastic.co/t/not-able-to-import-data-into-index-after-applying-custom-analyzer-and-proper-mapping-re-posting-it/104656/2 "2017-10-23T08:40:24Z")

</div>

can you please provide a full reproduction using curl or sense syntax so others can reproduce? This includes index creation, mapping configuration, sample indexing of documents.

Thanks!

---

<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 24, 2017, 8:50am UTC](https://discuss.elastic.co/t/not-able-to-import-data-into-index-after-applying-custom-analyzer-and-proper-mapping-re-posting-it/104656/3 "2017-10-24T08:50:16Z")

</div>

Thank you for your reply

i fixed it myself ..

---

<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 21, 2017, 8:50am UTC](https://discuss.elastic.co/t/not-able-to-import-data-into-index-after-applying-custom-analyzer-and-proper-mapping-re-posting-it/104656/4 "2017-11-21T08:50:17Z")

</div>

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