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

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

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!

Thank you for your reply

i fixed it myself ..

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