我是新來的彈性搜索,我的查詢有問題。用`field`查詢不會返回任何內容
當我做了一場比賽,我得到這個;
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 5,
"max_score": 1,
"hits": [{
"_index": "stations",
"_type": "station",
"_id": "4432",
"_score": 1,
"_source": {
"SiteName": "Abborrkroksvägen",
"LastModifiedUtcDateTime": "2015-02-13 10:34:20.643",
"ExistsFromDate": "2015-02-14 00:00:00.000"
}
},
{
"_index": "stations",
"_type": "station",
"_id": "9110",
"_score": 1,
"_source": {
"SiteName": "Abrahamsberg",
"LastModifiedUtcDateTime": "2012-03-26 23:55:32.900",
"ExistsFromDate": "2012-06-23 00:00:00.000"
}
}
]
}
}
我的搜索查詢是這樣的:
{
"query": {
"query_string": {
"fields": ["SiteName"],
"query": "a"
}
}
}
的問題是,當我運行上面的查詢,我得到空的結果,這是奇怪的。我應該從我的索引中收到這兩份文件,對吧?
我在做什麼錯?我是否索引了我的數據?或者我的查詢搞砸了?
感謝任何幫助,我可以得到。多謝你們!