Package com.flaptor.hounder.searcher.query

Examples of com.flaptor.hounder.searcher.query.MatchAllQuery


    indexer.index(addA);
    indexer.index(addB);
    Execute.sleep(8000);

    AFilter filter = new ValueFilter("nonExistentField", "noValue");
    GroupedSearchResults sr = searcher.search(new MatchAllQuery(), 0, 10, noGroup, 1, filter, null);
    assertEquals(0, sr.totalGroupsEstimation());
  }
View Full Code Here


            requiresPort = {10000, 10001, 10010, 10011, 10012})
  public void testValueFilter()  throws SearcherException{
    indexer.index(addA);
    indexer.index(addB);
    Execute.sleep(8000);
    GroupedSearchResults sr = searcher.search(new MatchAllQuery(), 0, 10, noGroup, 1, null, null);
    assertEquals(2, sr.totalGroupsEstimation());

    AFilter filter = new ValueFilter("content", "contenta");
    sr = searcher.search(new MatchAllQuery(), 0, 10, noGroup, 1, filter, null);
    assertEquals(1, sr.totalGroupsEstimation());
  }
View Full Code Here

        indexer.index(group1b);
        indexer.index(group2a);
        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(group1b);
        indexer.index(group2a);
        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());
    }
View Full Code Here

        Execute.sleep(8000);

        GroupedSearchResults newGsr, gsr;
        float newHitRatio, hitRatio;

        newGsr = cacheSearcher.search(new MatchAllQuery(),0,3,new StoredFieldGroup("group"),2,null,new FieldSort(false,"group",FieldSort.OrderType.STRING));
        newHitRatio = cache.getHitRatio();
        for (int i = 0; i < 20; ++i) {
            gsr = newGsr;
            hitRatio = newHitRatio;

            newGsr = cacheSearcher.search(new MatchAllQuery(),0,3,new StoredFieldGroup("group"),2,null,new FieldSort(false,"group",FieldSort.OrderType.STRING));
            newHitRatio = cache.getHitRatio();

            assertTrue(gsr == newGsr);
            assertTrue(hitRatio < newHitRatio);
        }
View Full Code Here

        Execution<Void> execution = new Execution<Void>();
        for (int times = 0; times < 50; times++) {
            execution.addTask(new Callable<Void>() {
                public Void call() throws Exception {
                    GroupedSearchResults gsr = multiSearcher.search(new MatchAllQuery(),0,docsPerSearcher*numServers,new StoredFieldGroup("group"),docsPerGroup,null,null);

                    if (docsPerSearcher / docsPerGroup != gsr.groups()) throw new Exception("Not the same count of groups.");

                    for (int i = 0; i < gsr.groups(); i++) {
                        if (docsPerGroup != gsr.getGroup(i).last().size()) {
View Full Code Here

TOP

Related Classes of com.flaptor.hounder.searcher.query.MatchAllQuery

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.