johtani / elasticsearch-extended-analyze

Extend Analyze API Plugin for Elasticsearch
Apache License 2.0
43 stars 8 forks source link

Not divide CustomAnalyzer #5

Closed johtani closed 10 years ago

johtani commented 10 years ago

Use custom analyzer that defined at creating index, the plugin output only analyzer's tokes.

johtani commented 10 years ago

using following index creation command and request query.

curl -XPUT 'http://localhost:9200/extended_test/' -d'
{
    "index":{
        "analysis":{
             "char_filter" : {
                 "my_char_filter" : {
                     "type" : "mapping",
                     "mappings" : ["ph=>f","qu=>q"]
                  }
            },
            "analyzer" : {
                "my_analyzer" : {
                    "type" : "custom",
                    "tokenizer" : "kuromoji_tokenizer",
                    "filter" : ["kuromoji_baseform", "kuromoji_readingform"],
                    "char_filter" : ["my_char_filter"]
                }
            }
        }
    }
}
'```

query and response.

curl -XPOST 'localhost:9200/extended_test/_extended_analyze?analyzer=my_analyzer&pretty' -d 'THIS IS A PEN' { "custom_analyzer" : false, "analyzer" : { "my_analyzer" : [ { ...


Maybe, I mistake handling CustomAnalyzer and NamedAnalyzer.