Package org.apache.solr.client.solrj.request

Examples of org.apache.solr.client.solrj.request.QueryRequest


        solrQuery.setFacet(true);
        solrQuery.setFacetMinCount(1);
        solrQuery.setFacetLimit(8);
        solrQuery.addFacetField("name");
        solrQuery.addFacetField("code");
        SolrRequest request = new QueryRequest(solrQuery, METHOD.POST);
        // request.setPath(getRequestPath());
        QueryResponse response = new QueryResponse(productSkuSolrServer.request(request), productSkuSolrServer);
        logger.debug("QueryResponse Obj: " + response);
        List<ProductSkuSolr> productSkuSolrList = response.getBeans(ProductSkuSolr.class);
        logger.debug(" productSkuSolrList: " + productSkuSolrList);
View Full Code Here


            solrQuery.setFacetMinCount(1);
            solrQuery.setFacetLimit(8);
            solrQuery.addFacetField(facetField);
        }

        SolrRequest request = new QueryRequest(solrQuery, METHOD.POST);

        QueryResponse response = new QueryResponse(customerSolrServer.request(request), customerSolrServer);
        logger.debug("QueryResponse Obj: " + response);
        List<CustomerSolr> customerSolrList = response.getBeans(CustomerSolr.class);
        logger.debug(" customerSolrList: " + customerSolrList);
View Full Code Here

        solrQuery.setQuery("*");
        solrQuery.setFacet(true);
        solrQuery.setFacetMinCount(1);
        solrQuery.setFacetLimit(8);
        solrQuery.addFacetField("lastname");
        SolrRequest request = new QueryRequest(solrQuery, METHOD.POST);
        // request.setPath(getRequestPath());
        QueryResponse response = new QueryResponse(customerSolrServer.request(request), customerSolrServer);
        List<CustomerSolr> customerSolrList = response.getBeans(CustomerSolr.class);
        List<FacetField> customerSolrFacetFieldList = response.getFacetFields();
        CustomerResponseBean customerResponseBean = new CustomerResponseBean();
View Full Code Here

        modParams.set(CoreAdminParams.ACTION, CollectionAction.CREATE.name());
        modParams.set("name", name);
        modParams.set("numShards", numShards);
        modParams.set("replicationFactor", replicationFactor);
        modParams.set("collection.configName", configName);
        QueryRequest request = new QueryRequest(modParams);
        request.setPath("/admin/collections");
        return server.request(request);
    }
View Full Code Here

  private NamedList<Object> createAlias(String alias, String collections) throws SolrServerException, IOException {
    ModifiableSolrParams params = new ModifiableSolrParams();
    params.set("collections", collections);
    params.set("name", alias);
    params.set("action", CollectionAction.CREATEALIAS.toString());
    QueryRequest request = new QueryRequest(params);
    request.setPath("/admin/collections");
    return cloudClient.request(request);
  }
View Full Code Here

  private NamedList<Object> createAlias(String alias, String collections) throws SolrServerException, IOException {
    ModifiableSolrParams params = new ModifiableSolrParams();
    params.set("collections", collections);
    params.set("name", alias);
    params.set("action", CollectionAction.CREATEALIAS.toString());
    QueryRequest request = new QueryRequest(params);
    request.setPath("/admin/collections");
    return cloudClient.request(request);
  }
View Full Code Here

        final SolrServer solr = new HttpSolrServer(baseURL + "/" + index);
        final ModifiableSolrParams params = new ModifiableSolrParams();
        params.set("qt", "/");
        params.set("q", field + ":" + term);
        final SolrRequest req = new QueryRequest(params);

        final QueryResponse resp = solr.query(params);
        System.out.println("resp: " + resp);
    }
View Full Code Here

  private NamedList<Object> createAlias(String alias, String collections) throws SolrServerException, IOException {
    ModifiableSolrParams params = new ModifiableSolrParams();
    params.set("collections", collections);
    params.set("name", alias);
    params.set("action", CollectionAction.CREATEALIAS.toString());
    QueryRequest request = new QueryRequest(params);
    request.setPath("/admin/collections");
    return cloudClient.request(request);
  }
View Full Code Here

TOP

Related Classes of org.apache.solr.client.solrj.request.QueryRequest

Copyright © 2018 www.massapicom. 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.