how to create analyzer mapping for custom analyzer.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

how to create analyzer mapping for custom analyzer.

Sam-4
Hi

I try following mapping for custom analyzer:

{ "index" : { "_index" : "twitter", "_type" : "tweet", "_id" :
"1" ,"_analyzer"="myanalyzer" } }
{ "tweet" : { "text" : "this is a tweet" } }
{ "myanalyzer" :
                {
                "type" : "custom",
                "tokenizer" : "standard",
                "filter" : {"asciifolding","stop":{"stopwords":
{"stop1","stop2"}},"length":{"min":"0","max":"2000"},"snowball",
"standard", "lowercase"}
               }
}
{ "delete" : { "_index" : "twitter", "_type" : "tweet", "_id" :
"2" } }
{ "create" : { "_index" : "twitter", "_type" : "tweet", "_id" :
"1" } }
{ "tweet" : { "text" : "another tweet" } }

please correct me if mapping is wrong. what will be correct mapping.

Thanks
Loading...