Hi I'm newbie about Elastic Search. bi konuda How can i get some field
on searched result. Assume that is the code;
SearchResponse response = client.prepareSearch("twitter")
.addField("user").setQuery(termQuery("user", "kimchy"))
.execute().actionGet();
The field is set to search query but I wanna get them all but I could
not found the correct function for response.
In the SearchResponse#hits you can iterate over SearchHit, and for each
hit, you can get fields back.
On Sat, Apr 28, 2012 at 3:44 PM, Ahmet DAL ceahmetdal@gmail.com wrote:
Hi I'm newbie about Elastic Search. bi konuda How can i get some field
on searched result. Assume that is the code;
SearchResponse response = client.prepareSearch("twitter").addField("user").setQuery(termQuery("user", "kimchy"))
.execute().actionGet();
The field is set to search query but I wanna get them all but I could
not found the correct function for response.
Hi!
I have the same problem and want to retrieve only specific fields from the
resultset, but i can't find it.
My results look like this:
searchHit.field("title")) ->
Lorg.elasticsearch.search.internal.InternalSearchHit
searchHit.getField() -> same as .field
searchHit.getSourceasString shows the correct Result...
Thanks!
Am Sonntag, 29. April 2012 19:33:56 UTC+2 schrieb kimchy:
In the SearchResponse#hits you can iterate over SearchHit, and for each
hit, you can get fields back.On Sat, Apr 28, 2012 at 3:44 PM, Ahmet DAL <ceahm...@gmail.com<javascript:>
wrote:
Hi I'm newbie about Elastic Search. bi konuda How can i get some field
on searched result. Assume that is the code;
SearchResponse response = client.prepareSearch("twitter").addField("user").setQuery(termQuery("user", "kimchy"))
.execute().actionGet();
The field is set to search query but I wanna get them all but I could
not found the correct function for response.
--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.