Have you tried setting no fields to be returned or the explicit
setNoFields() method?
http://jenkins.elasticsearch.org/job/Elasticsearch%20Master%20Branch%20Javadoc/Elasticsearch_API_Documentation/org/elasticsearch/action/search/SearchRequestBuilder.html#setNoFields()
--
Ivan
On Thu, Oct 16,
Is there a way in elasticsearch using JAVA API to get only the ids of the
documents returned for a give query.
SearchResponse sr =
esClient.prepareSearch(index).setSize(resultSize).setQuery(q).setScroll(new
TimeValue(1)).setQuery(fqb).setFetchSource(false).get();
but I get empty hits