Package com.senseidb.indexing

Examples of com.senseidb.indexing.SenseiIndexPruner


            QueryParser queryParser = new QueryParser(Version.LUCENE_35, "contents", analyzer);
            queryBuilderFactory = new DefaultJsonQueryBuilderFactory(queryParser);
        }
        SenseiCore senseiCore = new SenseiCore(nodeid, partitions, zoieSystemFactory, indexingManager, queryBuilderFactory, decorator);
        senseiCore.setSystemInfo(sysInfo);
        SenseiIndexPruner indexPruner = pluginRegistry.getBeanByFullPrefix(SENSEI_INDEX_PRUNER, SenseiIndexPruner.class);
        if (indexPruner != null) {
            senseiCore.setIndexPruner(indexPruner);
        }
        if (pluggableSearchEngineManager != null) {
            senseiCore.setPluggableSearchEngineManager(pluggableSearchEngineManager);
View Full Code Here


      {
          final List<BoboIndexReader> segmentReaders = BoboBrowser.gatherSubReaders(readerList);
          if (segmentReaders!=null && segmentReaders.size() > 0) {
            final AtomicInteger skipDocs = new AtomicInteger(0);

            final SenseiIndexPruner pruner = _core.getIndexPruner();

            List<BoboIndexReader> validatedSegmentReaders = _timerMetric.time(new Callable<List<BoboIndexReader>>(){

               @Override
               public List<BoboIndexReader> call() throws Exception {
                  IndexReaderSelector readerSelector = pruner.getReaderSelector(request);
                  List<BoboIndexReader> validatedReaders = new ArrayList<BoboIndexReader>(segmentReaders.size());
                  for (BoboIndexReader segmentReader : segmentReaders){
                    if (readerSelector.isSelected(segmentReader)){
                      validatedReaders.add(segmentReader);
                    }
                    else{
                      skipDocs.addAndGet(segmentReader.numDocs());
                    }
                  }
                  return validatedReaders;
                }

            });

            pruner.sort(validatedSegmentReaders);

            browser = new MultiBoboBrowser(BoboBrowser.createBrowsables(validatedSegmentReaders));
            request.setSearchable(browser);
            request.setQueryBuilderFactory(queryBuilderFactory);
            BrowseRequest breq = RequestConverter.convert(request, queryBuilderFactory);
View Full Code Here

TOP

Related Classes of com.senseidb.indexing.SenseiIndexPruner

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.