Examples of totalGroupsEstimation()


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

                @SuppressWarnings("unchecked")
                int numSearcher = ((CallableWithId<GroupedSearchResults, Integer>)result.getTask()).getId();
                if (result.isFinishedOk()) {
                  GroupedSearchResults gsr = result.getResults();
                  goodResultsMap.put(numSearcher, gsr);
                    totalDocuments += gsr.totalGroupsEstimation();
                    // gather stats from the uni-searchers
                  Statistics.getStatistics().notifyEventValue("averageTimes_" + searchers.get(numSearcher).getTextualIdentifier(), gsr.getResponseTime());
                } else {
                    badResults++;
                    logger.warn("Exception from remote searcher " +  numSearcher, result.getException());
View Full Code Here

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

  public void testLatinText() throws SearcherException{
    indexer.index(latin1);
    Execute.sleep(8000);
    GroupedSearchResults sr;
        sr = searcher.search(new LazyParsedQuery("xsín"), 0, 10, noGroup, 1, null, null);
    assertEquals("Searching 'xsín'", 1, sr.totalGroupsEstimation());
        sr = searcher.search(new LazyParsedQuery("xsin"), 0, 10, noGroup, 1, null, null);
    assertEquals("Searching 'xsin'", 1, sr.totalGroupsEstimation());
        sr = searcher.search(new LazyParsedQuery("xcón"), 0, 10, noGroup, 1, null, null);
    assertEquals("Searching 'xcón'", 1, sr.totalGroupsEstimation());
        sr = searcher.search(new LazyParsedQuery("xcon"), 0, 10, noGroup, 1, null, null);
View Full Code Here

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

    Execute.sleep(8000);
    GroupedSearchResults sr;
        sr = searcher.search(new LazyParsedQuery("xsín"), 0, 10, noGroup, 1, null, null);
    assertEquals("Searching 'xsín'", 1, sr.totalGroupsEstimation());
        sr = searcher.search(new LazyParsedQuery("xsin"), 0, 10, noGroup, 1, null, null);
    assertEquals("Searching 'xsin'", 1, sr.totalGroupsEstimation());
        sr = searcher.search(new LazyParsedQuery("xcón"), 0, 10, noGroup, 1, null, null);
    assertEquals("Searching 'xcón'", 1, sr.totalGroupsEstimation());
        sr = searcher.search(new LazyParsedQuery("xcon"), 0, 10, noGroup, 1, null, null);
    assertEquals("Searching 'xcon'", 1, sr.totalGroupsEstimation());
  }
View Full Code Here

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

        sr = searcher.search(new LazyParsedQuery("xsín"), 0, 10, noGroup, 1, null, null);
    assertEquals("Searching 'xsín'", 1, sr.totalGroupsEstimation());
        sr = searcher.search(new LazyParsedQuery("xsin"), 0, 10, noGroup, 1, null, null);
    assertEquals("Searching 'xsin'", 1, sr.totalGroupsEstimation());
        sr = searcher.search(new LazyParsedQuery("xcón"), 0, 10, noGroup, 1, null, null);
    assertEquals("Searching 'xcón'", 1, sr.totalGroupsEstimation());
        sr = searcher.search(new LazyParsedQuery("xcon"), 0, 10, noGroup, 1, null, null);
    assertEquals("Searching 'xcon'", 1, sr.totalGroupsEstimation());
  }

View Full Code Here

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

        sr = searcher.search(new LazyParsedQuery("xsin"), 0, 10, noGroup, 1, null, null);
    assertEquals("Searching 'xsin'", 1, sr.totalGroupsEstimation());
        sr = searcher.search(new LazyParsedQuery("xcón"), 0, 10, noGroup, 1, null, null);
    assertEquals("Searching 'xcón'", 1, sr.totalGroupsEstimation());
        sr = searcher.search(new LazyParsedQuery("xcon"), 0, 10, noGroup, 1, null, null);
    assertEquals("Searching 'xcon'", 1, sr.totalGroupsEstimation());
  }


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

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

        searcherConfig.set("compositeSearcher.useSpellCheckSuggestQuery", "true");
        searcherConfig.set("searcher.suggestQuerySearcher.dictionaryDir", spellDir.getFile().getAbsolutePath());
        searcher = new CompositeSearcher();

        GroupedSearchResults res = searcher.search(new LazyParsedQuery("contentb"), 0, 10, null, 20, null, null);
        assertEquals(1, res.totalGroupsEstimation());
        res = searcher.search(new LazyParsedQuery("content"), 0, 10, null, 20, null, null);
        assertEquals(0, res.totalGroupsEstimation());
        assertNotNull(res.getSuggestedQuery());
        res = searcher.search(res.getSuggestedQuery(), 0, 10, null, 20, null, null);
        assertEquals(1, res.totalGroupsEstimation());
View Full Code Here

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

        searcher = new CompositeSearcher();

        GroupedSearchResults res = searcher.search(new LazyParsedQuery("contentb"), 0, 10, null, 20, null, null);
        assertEquals(1, res.totalGroupsEstimation());
        res = searcher.search(new LazyParsedQuery("content"), 0, 10, null, 20, null, null);
        assertEquals(0, res.totalGroupsEstimation());
        assertNotNull(res.getSuggestedQuery());
        res = searcher.search(res.getSuggestedQuery(), 0, 10, null, 20, null, null);
        assertEquals(1, res.totalGroupsEstimation());

        searcherConfig.set("compositeSearcher.useSuggestQuery", "false");
View Full Code Here

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

        assertEquals(1, res.totalGroupsEstimation());
        res = searcher.search(new LazyParsedQuery("content"), 0, 10, null, 20, null, null);
        assertEquals(0, res.totalGroupsEstimation());
        assertNotNull(res.getSuggestedQuery());
        res = searcher.search(res.getSuggestedQuery(), 0, 10, null, 20, null, null);
        assertEquals(1, res.totalGroupsEstimation());

        searcherConfig.set("compositeSearcher.useSuggestQuery", "false");
    }

View Full Code Here

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

  public void testIndexingDocumentBoost()  throws SearcherException{
    indexer.index(addC);
    indexer.index(addCb);
    Execute.sleep(8000);
    GroupedSearchResults sr = searcher.search(new TermQuery("content", "contentc"), 0, 10,noGroup, 1, null, null);
    assertEquals(2, sr.totalGroupsEstimation());
    Document d1 = sr.getGroup(0).last().elementAt(0);
    assertEquals("cb", d1.get("docId"));
    Document d2 = sr.getGroup(1).last().elementAt(0);
    assertEquals("c", d2.get("docId"));
  }
View Full Code Here

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

    @TestInfo(testType = TestInfo.TestType.SYSTEM,
            requiresPort = {10000, 10001, 10010, 10011, 10012})
  public void testWhatYouAddIsWhatYouGet()  throws SearcherException{
    Execute.sleep(8000);
    GroupedSearchResults sr = searcher.search(new TermQuery("content", "contenta"), 0, 10, noGroup, 1, null, null);
    assertEquals(0, sr.totalGroupsEstimation());
    Execute.sleep(8000);
    sr = searcher.search(new TermQuery("content", "contentb"), 0, 10, noGroup, 1, null, null);
    assertEquals(0, sr.totalGroupsEstimation());

    indexer.index(addA);
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.