Hello,
Since I updated my cluster from 1.7 to 2.4 the query_string query stopped working.
However the term query still works.
Let's say I put 3 documents in the "us" index :
curl -XPUT 'http://localhost:9200/us/tweet/10?pretty=1' -d '
{
"date" : "2014-09-20",
"name" : "John Smith",
"tweet" : "Elasticsearch surely is one of the hottest new NoSQL products",
"user_id" : 1
}
'
curl -XPUT 'http://localhost:9200/us/tweet/12?pretty=1' -d '
{
"date" : "2014-09-22",
"name" : "John Smith",
"tweet" : "Elasticsearch and I have left the honeymoon stage, and I still love her.",
"user_id" : 1
}
'
curl -XPUT 'http://localhost:9200/us/tweet/4?pretty=1' -d '
{
"date" : "2014-09-14",
"name" : "John Smith",
"tweet" : "@mary it is not just text, it does everything",
"user_id" : 1
}
'
Then if I execute the following query :
{
"query": {
"bool": {
"must": [
{
"query_string": {
"default_field": "tweet.tweet",
"query": "elasticsearch"
}
}
],
"must_not": [ ],
"should": [ ]
}
},
"from": 0,
"size": 10,
"sort": [ ],
"aggs": { }
}
I get
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": [ ]
}
}
I can't figure out why.
I checked the logs and I see nothing wrong.
Can you help me?
Thanks