Package com.flaptor.hounder.cluster

Examples of com.flaptor.hounder.cluster.MultiSearcher


            DeployModule.addModuleListener(nodeListener, new DeployListenerImplementation());
        nodeListener.start();
        }

      if (searcherConfig.getBoolean("searcher.isMultiSearcher")) {
        baseSearcher = new MultiSearcher();
      } else {
        baseSearcher = new Searcher();
      }
        searcher = baseSearcher;
View Full Code Here


        doQueries(false);
        doQueries(true);
    }

    private void doQueries(boolean withCompositethrows SearcherException {
        final ISearcher multiSearcher = withComposite ? new CompositeSearcher() : new MultiSearcher();

        Execution<Void> execution = new Execution<Void>();
        GroupedSearchResults results = multiSearcher.search(new LazyParsedQuery("content"), 0, numServers, new NoGroup(), 1, null, null);
        assertEquals(numServers * docsPerSearcher, results.totalGroupsEstimation());
        for (int times = 0; times < 50; times++){
View Full Code Here


        //now check through multiSearcher
        Config.getConfig("multiSearcher.properties").set("multiSearcher.hosts", hosts);

        final ISearcher multiSearcher = new MultiSearcher(new AlwaysRetryPolicy());
        Thread.sleep(5000);

        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.cluster.MultiSearcher

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.