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

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


        break;
      default:
        throw new IllegalArgumentException("Admin operation: " + adminOp + " is not supported!");
    }

    QueryRequest request = new QueryRequest(modParams);
    request.setPath("/admin/collections");
    return request;
  }
View Full Code Here


    catch (Exception ex) {
    }

    // now Make sure AAA is in 0 and BBB in 1
    SolrQuery q = new SolrQuery();
    QueryRequest r = new QueryRequest(q);
    q.setQuery("id:AAA");
    assertEquals(1, r.process(getSolrCore0()).getResults().size());
    assertEquals(0, r.process(getSolrCore1()).getResults().size());

    // Now test Changing the default core
    assertEquals(1, getSolrCore0().query(new SolrQuery("id:AAA")).getResults().size());
    assertEquals(0, getSolrCore0().query(new SolrQuery("id:BBB")).getResults().size());
View Full Code Here

          params.remove(CommonParams.VERSION);

          SolrServer server = new CommonsHttpSolrServer(url, client);
          // SolrRequest req = new QueryRequest(SolrRequest.METHOD.POST, "/select");
          // use generic request to avoid extra processing of queries
          QueryRequest req = new QueryRequest(params);
          req.setMethod(SolrRequest.METHOD.POST);

          // no need to set the response parser as binary is the default
          // req.setResponseParser(new BinaryResponseParser());
          // srsp.rsp = server.request(req);
          // srsp.rsp = server.query(sreq.params);
View Full Code Here

          fq.append(")");
          solrQuery.addFilterQuery(fq.toString());
        }
       

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

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

        solrQuery.setQuery("*");
        solrQuery.setFacet(true);
        solrQuery.setFacetMinCount(1);
        solrQuery.setFacetLimit(8);
        solrQuery.addFacetField("name");
        SolrRequest request = new QueryRequest(solrQuery, METHOD.POST);
        // request.setPath(getRequestPath());
        QueryResponse response = new QueryResponse(storeSolrServer.request(request), storeSolrServer);
        List<StoreSolr> storeSolrList = response.getBeans(StoreSolr.class);
        List<FacetField> storeSolrFacetFieldList = response.getFacetFields();
        StoreResponseBean storeResponseBean = new StoreResponseBean();
View Full Code Here

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

        SolrRequest request = new QueryRequest(solrQuery, METHOD.POST);
        QueryResponse response = new QueryResponse(catalogCategorySolrServer.request(request), catalogCategorySolrServer);
        logger.debug("QueryResponse Obj: " + response);

        List<CatalogCategorySolr> categorySolrList = response.getBeans(CatalogCategorySolr.class);
        logger.debug(" categorySolrList: " + categorySolrList);
View Full Code Here

        solrQuery.setQuery("*");
        solrQuery.setFacet(true);
        solrQuery.setFacetMinCount(1);
        solrQuery.setFacetLimit(8);
        solrQuery.addFacetField("code");
        SolrRequest request = new QueryRequest(solrQuery, METHOD.POST);
        // request.setPath(getRequestPath());
        QueryResponse response = new QueryResponse(catalogCategorySolrServer.request(request), catalogCategorySolrServer);
        List<CatalogCategorySolr> productSolrList = response.getBeans(CatalogCategorySolr.class);
        List<FacetField> productSolrFacetFieldList = response.getFacetFields();

View Full Code Here

      }
          fq.append(")");
          solrQuery.addFilterQuery(fq.toString());
        }

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

        logger.debug("QueryResponse Obj: " + response);

        List<ProductMarketingSolr> ProductMarketingSolrList = response.getBeans(ProductMarketingSolr.class);
View Full Code Here

        solrQuery.setQuery("*");
        solrQuery.setFacet(true);
        solrQuery.setFacetMinCount(1);
        solrQuery.setFacetLimit(8);
        solrQuery.addFacetField(ProductMarketingResponseBean.PRODUCT_MARKETING_DEFAULT_FACET_FIELD);
        SolrRequest request = new QueryRequest(solrQuery, METHOD.POST);
       
        QueryResponse response = new QueryResponse(productMarketingSolrServer.request(request), productMarketingSolrServer);
       
        logger.debug("QueryResponse Obj: " + response);
       
View Full Code Here

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

        SolrRequest request = new QueryRequest(solrQuery, METHOD.POST);
        QueryResponse response = new QueryResponse(productSkuSolrServer.request(request), productSkuSolrServer);
        logger.debug("QueryResponse Obj: " + response);
        List<ProductSkuSolr> productSkuSolrList = response.getBeans(ProductSkuSolr.class);
        logger.debug(" productSkuSolrList: " + productSkuSolrList);
        ProductSkuResponseBean productResponseBean = new ProductSkuResponseBean();
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.