Package com.flaptor.hounder.searcher

Examples of com.flaptor.hounder.searcher.GroupedSearchResults.groups()


        MultiGSR result = new MultiGSR(gsr,searchers.size());

        for (Entry<Integer, GroupedSearchResults> entry: goodResultsMap.entrySet()){
          int searcherNum= entry.getKey();
          GroupedSearchResults tgsr = entry.getValue();
      result.setData(searcherNum, tgsr.getResponseTime(), tgsr.groups());
        }
        for (Entry<Integer, String> entry: badResultsMap.entrySet()){
          int searcherNum= entry.getKey();
          result.setData(searcherNum, -1L, -1);
          logger.warn("Searcher " + entry.getKey() + " failed with " + entry.getValue());
View Full Code Here


        indexer.index(group2b);
        indexer.index(group3a);
    Execute.sleep(8000);
        GroupedSearchResults gsr = searcher.search(new MatchAllQuery(),0,3,new StoredFieldGroup("group"),2,null,new FieldSort(false,"group",FieldSort.OrderType.STRING));

        assertEquals(3,gsr.groups());
        assertEquals(2,gsr.getGroup(0).last().size());
        assertEquals(2,gsr.getGroup(1).last().size());
        assertEquals(1,gsr.getGroup(2).last().size());
    }
View Full Code Here

        indexer.index(group2b);
        indexer.index(group3a);
    Execute.sleep(8000);
        GroupedSearchResults sr = searcher.search(new MatchAllQuery(),0,3,new StoredFieldGroup("group"), 5,null,null);

        assertEquals(3,sr.groups());
    }

    @TestInfo(testType = TestInfo.TestType.SYSTEM,
            requiresPort = {10000, 10001, 10010, 10011, 10012})
    public void testCache()  throws SearcherException{
View Full Code Here

        Execute.sleep(10000);


        // perform query
        GroupedSearchResults gsr = searcher.search(new TermQuery("content", "contenta"), 0, 10, new NoGroup(), 1, null, null);
        assertEquals(gsr.groups(),2);

        // check that small payload is first, if we do not use payloads.
        assertEquals(gsr.getGroup(0).last().get(0).get("docId"),"small");
        assertEquals(gsr.getGroup(1).last().get(0).get("docId"),"big");
View Full Code Here

        searcher = new CompositeSearcher();
        Execute.sleep(10000);

        // perform query
        gsr = searcher.search(new AndQuery(new TermQuery("content", "contenta"),new PayloadQuery("payload")), 0, 10, new NoGroup(), 1, null, null);
        assertEquals(gsr.groups(),2);

        // check that now, using payloads, big payload is first
        assertEquals("big", gsr.getGroup(0).last().get(0).get("docId"));
        assertEquals("small", gsr.getGroup(1).last().get(0).get("docId"));
    }
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.