2014-01-28 149 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 –

相關問題