我在elasticsearch中有4個文檔。下面是它的外觀像Elasticsearch匹配查詢不起作用
我想查詢只有在字Python
在title
提到的文件。我正在使用head
插件,下面是我傳遞的GET命令。
然而,而不是讓其中提到Python
文檔,我收到的所有文件。
{
"took": 8,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 4,
"max_score": 1,
"hits": [
{
"_index": "library",
"_type": "book",
"_id": "2",
"_score": 1,
"_source": {
"title": "Building machine learning systems in JAVA",
"publish_date": "July 2014",
"price": 59.9
}
}
,
{
"_index": "library",
"_type": "book",
"_id": "4",
"_score": 1,
"_source": {
"title": "Building machine learning systems in C++",
"publish_date": "July 2016",
"price": 79.9
}
}
,
{
"_index": "library",
"_type": "book",
"_id": "1",
"_score": 1,
"_source": {
"title": "Building machine learning systems in Python",
"publish_date": "July 2013",
"price": 49.9
}
}
,
{
"_index": "library",
"_type": "book",
"_id": "3",
"_score": 1,
"_source": {
"title": "Building machine learning systems in SCALA",
"publish_date": "July 2015",
"price": 69.9
}
}
]
}
}
不知道我很想念
此答案可能有所幫助:https://stackoverflow.com/questions/34795053/es-keeps-returning-every-document/34796014#34796014 – Val