I'm trying to get a simple case-insensitive search to work by running
the querystring through the "standard" analyzer, but it doesn't seem
to be working for me. The index seems to be run through the analyzer,
as a querystring that is all lowercase matches a mixed-case record. A
mixed or uppercase querystring never matches though. I've tried
explicitly setting the analyzer parameter, with no effect.
I'm using 0.4.0, with no changes to the config file (which is empty).
Thanks for any help you can give me - here is an example session
illustrating the problem:
~ $ curl -XPUT http://localhost:9200/twitter/tweet/1 -d
'
{
user : "Kimchy",
postDate : "2009-11-15T14:12:12",
message : "trying out Elastic Search"
}
'
{"ok":true,"_index":"twitter","_type":"tweet","_id":"1"}
~ $ curl -XGET "http://localhost:9200/twitter/tweet/_search?
q=user:kimchy"
{"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":
1,"hits":[{"_index":"twitter","_type":"tweet","_id":"1", "_source" :
{
user : "Kimchy",
postDate : "2009-11-15T14:12:12",
message : "trying out Elastic Search"
}
}]}}
So far, so good. The lowercase term matched the mixed-case original,
but then:
~ $ curl -XGET "http://localhost:9200/twitter/tweet/_search?
q=user:KIMCHY"
{"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":
0,"hits":[]}}
With explicit analyzer specified:
~ $ curl -XGET "http://localhost:9200/twitter/tweet/_search?
q=user:KIMCHY&analyzer=standard"
{"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":
0,"hits":[]}}