Thanks Martijn. It works for me .. thanks alot.
I hava one more question if you can help me in this.
In elasticsearch, as we know, while querying we can give various aspects of
One category is Query_and_fetch v/s Query_then_fetch.
Also one more add on we can provide is the dfs query with both of them.
I heard one of the vedio of Shay Banon explaining dfs query and he
in case of dfs, there is an additional phase in which frequencies from all
*I am not sure what he means by frequencies. Is it just the distributed
term frequencies *
*or it also takes into account the distributed inverse document frequencies?
Thanks in advance.
On Monday, July 30, 2012 3:46:38 AM UTC-7, Martijn v Groningen wrote:
My question is: Can we only update using script? Any sample code for
Can I simply update value of any already indexed field?
As far as I know script is the only way to update a document. As long
as the _source of document is stored you can update any field of
Example showing how to update a title field:
Node node = nodeBuilder().client(true).node();
Client client = node.client();
String index = "my_index";
String type= "my_type";
String id = "1";
String newTitle = "my new title";
client.prepareUpdate(index, type, id)
.setScript("ctx._source.title="" + newTitle + """)