Package org.elasticsearch.action.search

Examples of org.elasticsearch.action.search.SearchRequestBuilder.request()


                            QueryBuilders.filteredQuery(
                                    QueryBuilders.matchAllQuery(),
                                    makeFilter()))
                    .setSearchType(SearchType.COUNT)
                    .addFacet(makeFacet(_facetName));
            _request = builder.request();
            final XContentBuilder xBuilder = XContentFactory.jsonBuilder();
            builder.internalBuilder().toXContent(xBuilder, null);
            _requestString = builder.toString();
            return builder.execute().actionGet();
        }
View Full Code Here


              SearchRequestBuilder builder = new SearchRequestBuilder(_client)
                  .setIndices(mapping.getTypeAlias()).setPostFilter(FilterBuilders.matchAllFilter())
                  .setScroll(TimeValue.timeValueSeconds(_scrollTimeoutSeconds))
                  .addSort("_id", SortOrder.ASC).setSize(batchSize);

              responseFuture = _client.search(builder.request());
            } else {
              responseFuture = _client.searchScroll(new SearchScrollRequestBuilder(_client, _scrollId)
                  .request());
            }
View Full Code Here

        final SearchRequestBuilder builder = new SearchRequestBuilder(client);
        builder.setIndices(indices);
        builder.setTypes(INDEX_TYPE);
        builder.setQuery(randomFrom(TestQueryType.values()).getQuery());
        return builder.request();
    }

    public static BenchmarkCompetitor randomCompetitor(Client client, String name, String[] indices,
                                                       Map<String, BenchmarkSettings> competitionSettingsMap,
                                                       int lowRandomIntervalBound, int highRandomIntervalBound, SearchRequest... requests) {
View Full Code Here

    try {

      // Execute the query and try to get hold of a query response
      SearchResponse response = null;
      try {
        response = nodeClient.search(requestBuilder.request()).actionGet();
      } catch (Throwable t) {
        throw new ContentRepositoryException(t);
      }

      // Create and configure the query result
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.