I am using ElasticSearch. When i search for documents on specific index types fields returns are empty in SearchHit

I am unable to get fields using Elastic Search. I have following query for
searching and needs all documents along with all fields but my Search Hits
is returning empty fields in each Search Hits. Can anyone guide me where i
am wrong. "QueryBuilder qb =
QueryBuilders.queryString(searchSourceBuilder.toString());"
SearchRequestBuilder request = client.prepareSearch() .setIndices(index)
.setTypes(type) .setQuery(qb) .setFrom(0)
.setSearchType(SearchType.QUERY_AND_FETCH) .setSize(60) .setExplain(true);

SearchResponse response = request.execute().actionGet();

Now my response has all searchhits but their fields are empty.

Thanks in advance

--
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.

Can anybody have a look on my post.

On Saturday, June 15, 2013 1:46:40 PM UTC+5, Sardar Waqas Ahmed wrote:

I am unable to get fields using Elastic Search. I have following query
for searching and needs all documents along with all fields but my Search
Hits is returning empty fields in each Search Hits. Can anyone guide me
where i am wrong. "QueryBuilder qb =
QueryBuilders.queryString(searchSourceBuilder.toString());"
SearchRequestBuilder request = client.prepareSearch() .setIndices(index)
.setTypes(type) .setQuery(qb) .setFrom(0)
.setSearchType(SearchType.QUERY_AND_FETCH) .setSize(60) .setExplain(true);

SearchResponse response = request.execute().actionGet();

Now my response has all searchhits but their fields are empty.

Thanks in advance

--
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.

By default, elasticsearch will not store fields, but does store the
document source. The data you want can be extracted from the source
document. This behavior assumes you are using the default. Proving your
mapping will give us more insights.

Also, please do not ask for help again five minutes later. The mailing list
is not a source for instantaneous answers, although occasionally it can be.
In addition, it is the weekend, so the number of readers is far lower.

Cheers,

Ivan

On Sat, Jun 15, 2013 at 1:51 AM, Sardar Waqas Ahmed <waqasbc073046@gmail.com

wrote:

Can anybody have a look on my post.

On Saturday, June 15, 2013 1:46:40 PM UTC+5, Sardar Waqas Ahmed wrote:

I am unable to get fields using Elastic Search. I have following
query for searching and needs all documents along with all fields but my
Search Hits is returning empty fields in each Search Hits. Can anyone guide
me where i am wrong. "QueryBuilder qb = QueryBuilders.queryString(**
searchSourceBuilder.toString()**);" SearchRequestBuilder request =
client.prepareSearch() .setIndices(index) .setTypes(type) .setQuery(qb)
.setFrom(0) .setSearchType(SearchType.**QUERY_AND_FETCH) .setSize(60)
.setExplain(true);

SearchResponse response = request.execute().actionGet();

Now my response has all searchhits but their fields are empty.

Thanks in advance

--
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.

--
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.