我在elasticsearch中有4个文档。下面是它的样子
https://gist.github.com/adamwathan/3584d1904e4f4c36096f
我正在尝试仅在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
}
}
]
}
}
不确定我缺少什么
答案 0 :(得分:1)
这可能是由您用来发送请求的工具引起的。
GET
经常不支持身体POST
。请改用input_file="day1.ale"
input_data=$(cat $input_file | tr \\11 \\7) # replace tabs with alarm bell
while IFS=$'\a' read Name Tracks Start End Take Tape UNC FPS Reel Scene
do
echo $FPS
done <<< "$input_data"
。