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

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

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