Package com.browseengine.bobo.api

Examples of com.browseengine.bobo.api.BoboBrowser.browse()


            }
           
           
                  BoboBrowser browser = new BoboBrowser(reader);
                 
          res=browser.browse(br);
         
        } catch (Exception e) {
          logger.error(e.getMessage(),e);
          throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,e.getMessage(),e);
        }
View Full Code Here


        BoboBrowser svc = null;
        long time = 0L;
        Exception ex = null;
        try {
          svc = new BoboBrowser(_reader);
          BrowseResult res = svc.browse(req);
          // System.out.println("num hits: "+res.getNumHits());
          getFacets(res);
          time = res.getTime();
        } catch (Exception e) {
          e.printStackTrace();
View Full Code Here

           req.setFacetSpec("proposal_accepts", fspec);
           req.setFacetSpec("num_endorsers", fspec);
           //req.setFacetSpec("group_id", fspec);
          long start = System.currentTimeMillis();
         
          BrowseResult result = svc.browse(req);
          long end = System.currentTimeMillis();
          System.out.println("took: "+(end-start));
          svc.close();
         
          Thread.sleep(200);
View Full Code Here

   
    FacetSpec fs = new FacetSpec();
    fs.setMinHitCount(1);
    req.setFacetSpec(PathHandlerName, fs);
   
    BrowseResult res = browser.browse(req);
    assertEquals(res.getNumHits(),1);
    FacetAccessible fa = res.getFacetAccessor(PathHandlerName);
    List<BrowseFacet> facets = fa.getFacets();
    System.out.println(facets);
    assertEquals(1,facets.size());
View Full Code Here

      BrowseSelection seli = new BrowseSelection("industry");
      seli.addValue("0000000052");
//      req.addSelection(seli );
      long tf0=0;
      long tf1=0;
      BrowseResult bres = browser.browse(req);
      for(Entry<String, FacetAccessible> entry: bres.getFacetMap().entrySet())
      {
//        System.out.println(entry.getKey());
        FacetAccessible fa = entry.getValue();
        tf0 = System.currentTimeMillis();
View Full Code Here

        BrowseResult result = null;
        BoboBrowser boboBrowser=null;
      try {
        boboBrowser=newBrowser();
       
          result = boboBrowser.browse(br);
          assertEquals(1,result.getNumHits());
          BrowseHit hit = result.getHits()[0];
          Document storedFields = hit.getStoredFields();
          assertNotNull(storedFields);
         
View Full Code Here

        BrowseResult result = null;
        BoboBrowser boboBrowser=null;
      try {
        boboBrowser=newBrowser();
       
          result = boboBrowser.browse(br);
          assertEquals(1,result.getNumHits());
          BrowseHit hit = result.getHits()[0];
          assertNull(hit.getStoredFields());
         
          br.setFetchStoredFields(true);
View Full Code Here

          assertEquals(1,result.getNumHits());
          BrowseHit hit = result.getHits()[0];
          assertNull(hit.getStoredFields());
         
          br.setFetchStoredFields(true);
          result = boboBrowser.browse(br);
          assertEquals(1,result.getNumHits());
          hit = result.getHits()[0];
          Document storedFields = hit.getStoredFields();
          assertNotNull(storedFields);
         
View Full Code Here

        BoboBrowser boboBrowser=null;
        SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy/MM/dd");
      try {
        boboBrowser=newBrowser();
       
          result = boboBrowser.browse(br);
          assertEquals(7,result.getNumHits());
          BrowseHit hit = result.getHits()[0];
          assertEquals(0,hit.getDocid());
          Object lowDate = hit.getRawField("date");
          Date date = dateFormatter.parse("2000/01/01");
View Full Code Here

      br.setOffset(0);
      br.setFacetSpec("number",new FacetSpec());
     
      BoboBrowser browser = newBrowser();
     
      BrowseResult res=browser.browse(br);
      FacetAccessible facetAccessor = res.getFacetAccessor("number");
      BrowseFacet facet = facetAccessor.getFacet("5");
     
      assertEquals(facet.getValue(), "0005");
      assertEquals(facet.getFacetValueHitCount(), 1);
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.