Skip to content

Instantly share code, notes, and snippets.

Created January 3, 2013 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/4444788 to your computer and use it in GitHub Desktop.
Save anonymous/4444788 to your computer and use it in GitHub Desktop.
SearchRequestBuilder search = client.prepareSearch(index)
.setTypes("type")
.setSearchType(SearchType.QUERY_AND_FETCH)
.setTimeout(TimeValue.timeValueMillis(2000))
.addFields("id_user", "url_crc32", "stats_nb", "type")
.setFrom(mainQuery.getOffset())
.setSize(mainQuery.getCount());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment