I build the following:
curl -XDELETE "http://localhost:9200/testindex"
curl -XPOST "http://localhost:9200/testindex" -d'
{
"mappings" : {
"article" : {
"dynamic" : false,
"properties" : {
"text" : {
"type" : "string",
"analyzer" : "snowball"
}
}
}
}
}'
... I populate the following:
curl -XPUT "http://localhost:9200/testindex/article/1" -d'{"text": "grey"}'
curl -XPUT "http://localhost:9200/testindex/article/2" -d'{"text": "gray"}'
curl -XPUT "http://localhost:9200/testindex/article/3" -d'{"text": "greyed"}'
curl -XPUT "http://localhost:9200/testindex/article/4" -d'{"text": "greying"}'
... I see the following when I search:
curl -XPOST "http://localhost:9200/testindex/_search" -d'
{
"query": {
"query_string": {
"query": "grey",
"analyzer" : "snowball"
}
}
}'
result is
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 0.30685282,
"hits": [
{
"_index": "testindex",
"_type": "article",
"_id": "1",
"_score": 0.30685282,
"_source": {
"text": "grey"
}
}
]
}
}
... I'm expecting 3 hits: grey
, greyed
, and greying
. Why doesn't this work? Note that I'm not interested in adding fuzziness to the search, since that will by default match on gray (but not greying).
what I'm doing wrong here?