Package org.elasticsearch.search.builder

Examples of org.elasticsearch.search.builder.SearchSourceBuilder.query()


      if (qDsl) {
        queryBuilder = QueryBuilders.wrapperQuery(q);
      } else {
        queryBuilder = QueryBuilders.queryString(q);
      }
      searchSourceBuilder.query(queryBuilder);
    }

    searchSourceBuilder.from(start);
    searchSourceBuilder.size(rows);
View Full Code Here


                    queryBuilder.defaultOperator(QueryStringQueryBuilder.Operator.AND);
                } else {
                    throw new ElasticSearchIllegalArgumentException("Unsupported defaultOperator [" + defaultOperator + "], can either be [OR] or [AND]");
                }
            }
            searchSourceBuilder.query(queryBuilder);
        }

        int from = request.paramAsInt("from", -1);
        if (from != -1) {
            searchSourceBuilder.from(from);
View Full Code Here

      @Override
      public ActionFuture<SearchResponse> execute(final Client client) {
        final SearchRequest request = Requests.searchRequest().searchType(
            SearchType.DFS_QUERY_AND_FETCH);
        final SearchSourceBuilder sourceBuilder = new SearchSourceBuilder();
        sourceBuilder.query(query);

        sourceBuilder.size(maxResults);
        request.source(sourceBuilder);
        return client.search(request);
      }
View Full Code Here

                }
            }
            if (searchSourceBuilder == null) {
                searchSourceBuilder = new SearchSourceBuilder();
            }
            searchSourceBuilder.query(queryBuilder);
        }

        int from = request.paramAsInt("from", -1);
        if (from != -1) {
            if (searchSourceBuilder == null) {
View Full Code Here

    // build the query
    SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
    if (q != null) {
      QueryStringQueryBuilder queryBuilder = QueryBuilders.queryString(q);
      searchSourceBuilder.query(queryBuilder);
    }

    searchSourceBuilder.from(start);
    searchSourceBuilder.size(rows);
View Full Code Here

                }
            }
            if (searchSourceBuilder == null) {
                searchSourceBuilder = new SearchSourceBuilder();
            }
            searchSourceBuilder.query(queryBuilder);
        }

        int from = request.paramAsInt("from", -1);
        if (from != -1) {
            if (searchSourceBuilder == null) {
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.