How to set snowball analyzer for _all field


(kiruba-2) #1

this is my mappings

curl -XPOST localhost:9200/twitter
curl -XPUT 'http://localhost:9200/twitter/tweet/_mapping' -d '
{
"tweet" : {
"_all":{
"enabled":"true",
"index_anaylzer":"snowball",
"search_anaylzer":"snowball"
},
"properties" : {
"message" : {
"type" : "string",
"search_analyzer" : "standard",
"index_analyzer" : "standard"
}
}
}
}'
and i indexed message values as* curl -XPUT
'http://localhost:9200/twitter/tweet/1' -d '{*

  • "message" : "Look, a fighting War-Unicorn!"*
    }'

curl -XGET localhost:9200/twitter/_search?pretty=true&q=fight - this
query is search only _all field but i didn't get any result .

what i need . if i search q=fight then the result will need to show.?

thanks

--


(system) #2