2014-01-28 151 views
5
获得xcontent

我卷曲查询工作无法从[email protected]

curl -v -XGET 'http://localhost:9200/entityitem/5/_mget' -d '{"ids" : ["5000027585", "5000027615"]}'

,但是当我用剩下的客户做GET查询

http://localhost:9200/entityitem/5/_mget?source={"ids" : ["5000027585", "5000027615"]}

我收到以下错误

未能派生xcontent从[email protected]

+0

在我的情况下,当查询的内容为空时,我得到了这个错误。 – antonbormotov

回答

0

试试这个

http://localhost:9200/entityitem/5/_mget?q=ids:5000027585%20OR%20ids:5000027615 

q是查询。 ID是你的领域。上面的网址等于查询

IDS:5000027585或ID:5000027615

这是由Elasticsearch支持的Lucene的语法。请记住使用%20来代替空间。

8

如果您收到此而继kibana教程中,你可能试图导入shakespeare.json文件。您可能已下载到下载文件夹,并在另一个文件夹中运行导入命令。将输入文件移至当前目录...

mv ~/Downloads/shakespeare.json . 

并运行curl xput命令导入莎士比亚数据。

curl -XPUT localhost:9200/_bulk --data-binary @shakespeare.json 
+0

保存我的一天xD –

相关问题