2017-04-25 51 views
0

我試圖使用腳本查詢來更新特定的文件,但不能肯定我需要查詢更新通過查詢使用開玩笑客戶

這裏與更新使用開玩笑客戶端,它的工作的哪班是我的代碼

String h = " { " 
       + " \"script\": { \n" 
       + " \"inline\": \"ctx._source.order=params.prasad\", \n " 
       + "\"params\": { \"prasad\":["+column+"] \n" 
       + " } , \n" 
       + "\"lang\": \"painless\" \n" 
       + "},\n" 
       + "\"query\": { \n" 
       + "\"term\": { \n" 
       + "\"orgid\": "+orgId+" \n" 
       + "} \n" 
       + "}"; 

LocalJestClientInstance.getInstance()getClient()執行(新Update.Builder(H)的.index(指數).TYPE(類型).build())。。

這不會更新我的文檔。

烏里發生是這樣的URI = loadfields/loadfields_type/_Update,方法= POST

相反_Up​​date如何獲得_update_by_query

+0

你是否設法解決這個問題? – Anant

回答

0

玩笑以前沒有它,但它看起來像它確實有它now

我的解決方法是使用第二個客戶端,一個標準的http客戶端,並解析JSON輸出只是爲了缺少這個功能。