Hi,

I'm to trying to get the filed values of a document which is already been 
set. But I have to pass the field name while doing so. 
In method call I may not know the fields whatever some one has already set. 
Can I get all the fileds from GetField without passing the field name ?

public static GetResponse getResponse(Client client)
  {
         GetResponse response = client.prepareGet("testindex","testtype", 
"1")
                                      .setFields("author","title")
                                      .execute().actionGet();
         return response;     
  }
 public String getFieldValues()
{
   Node node = nodeBuilder().client(true).data(false).node();
   Client client = node.client();
   
   GetResponse response = getResponse(client);
   Map<String, GetField> respMap = response.getFields();

   GetField field = respMap.get("title");
   String fields = (String)field.getValue();
               
   client.close();
   node.close();

           return fields;
}

Thanks,
Subhadip

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/010791d9-1e92-45a1-8be4-7df588ba9914%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to