Package com.browseengine.bobo.facets

Examples of com.browseengine.bobo.facets.FacetCountCollector


    {
      @Override
      public FacetCountCollector getFacetCountCollector(BoboIndexReader reader, int docBase){
      FacetHandler<FacetDataCache<?>> dependOnFacetHandler = (FacetHandler<FacetDataCache<?>>)getDependedFacetHandler(_dependsOnFacetName);
       
      FacetCountCollector defaultCollector = dependOnFacetHandler.getFacetCountCollectorSource(sel, ospec).getFacetCountCollector(reader, docBase);
      if (defaultCollector instanceof DefaultFacetCountCollector){
        return new BucketFacetCountCollector(_name, (DefaultFacetCountCollector)defaultCollector, ospec, _predefinedBuckets,reader.numDocs());
      }
      else{
        throw new IllegalStateException("dependent facet handler must build "+DefaultFacetCountCollector.class);
View Full Code Here


    public void setNextReader(BoboIndexReader reader,int docBase) throws IOException{
      ArrayList<FacetCountCollector> collectorList = new ArrayList<FacetCountCollector>();
      sortPostCollectors(reader);
      for (int i=0;i<_collectors.length;++i){
        _collectors[i].setNextReader(reader, docBase);
        FacetCountCollector collector = _collectors[i]._currentPointers.facetCountCollector;
        if(collector != null)
        {
          collectorList.add(collector);
        }
      }
View Full Code Here

    public void setNextReader(BoboSegmentReader reader, int docBase) throws IOException {
      ArrayList<FacetCountCollector> collectorList = new ArrayList<FacetCountCollector>();
      sortPostCollectors(reader);
      for (int i = 0; i < _collectors.length; ++i) {
        _collectors[i].setNextReader(reader, docBase);
        FacetCountCollector collector = _collectors[i]._currentPointers.facetCountCollector;
        if (collector != null) {
          collectorList.add(collector);
        }
      }
      _countCollectors = collectorList.toArray(new FacetCountCollector[collectorList.size()]);
View Full Code Here

  public LinkedList<FacetCountCollector> _countCollectorList = new LinkedList<FacetCountCollector>();
  public LinkedList<FacetCountCollector> _collectAllCollectorList = new LinkedList<FacetCountCollector>();
 
  public void setNextReader(BoboIndexReader reader,int docBase) throws IOException{
    if (_collectAllSource!=null){
      FacetCountCollector collector = _collectAllSource.getFacetCountCollector(reader, docBase);
      _collectAllCollectorList.add(collector);
      collector.collectAll();
    }
    else{
      if (_filter!=null){
      _currentPointers.docidSet = _filter.getRandomAccessDocIdSet(reader);
      _currentPointers.postDocIDSetIterator = _currentPointers.docidSet.iterator();
View Full Code Here

    public void setNextReader(BoboIndexReader reader,int docBase) throws IOException{
      ArrayList<FacetCountCollector> collectorList = new ArrayList<FacetCountCollector>();
      sortPostCollectors(reader);
      for (int i=0;i<_collectors.length;++i){
        _collectors[i].setNextReader(reader, docBase);
        FacetCountCollector collector = _collectors[i]._currentPointers.facetCountCollector;
        if(collector != null)
        {
          collectorList.add(collector);
        }
      }
View Full Code Here

    {
      FacetAccessible f = iter.next();
      if (f instanceof FacetCountCollector)
      {
        System.out.println("====================================");
        FacetCountCollector fc = (FacetCountCollector)f;
        int[] dist = BigIntArray.toArray(fc.getCountDistribution());
        if (dist!=null)
        {
          ChiSquaredFacetCountStatisticsGenerator gen = new ChiSquaredFacetCountStatisticsGenerator();
          gen.setMinCount(0);
          FacetCountStatistics stats = gen.generateStatistic(dist, 0);
          System.out.println("stat for field "+fc.getName()+": "+stats);
          System.out.println("Centered distribution score: " + (stats.getDistribution()-(double)(stats.getNumSamplesCollected()-1))/Math.sqrt((2.0*(double)(stats.getNumSamplesCollected()-1))));
          System.out.println("........................");
          List<BrowseFacet> facetList = fc.getFacets();
          System.out.println(facetList);
          System.out.println("........................");
        }
        System.out.println("====================================");
      }
View Full Code Here

    {
      @Override
      public FacetCountCollector getFacetCountCollector(BoboIndexReader reader, int docBase)
      {
        FacetDataCache<?> dataCache = (FacetDataCache<?>)reader.getFacetData(_dataHandlerName);
        FacetCountCollector baseCollector = baseCollectorSrc.getFacetCountCollector(reader, docBase);
        return new HistogramCollector<T>(getName(),baseCollector, dataCache, ospec, _start, _end, _unit);
      }
  };
  }
View Full Code Here

    {
      @Override
      public FacetCountCollector getFacetCountCollector(BoboIndexReader reader, int docBase){
      FacetHandler<FacetDataCache<?>> dependOnFacetHandler = (FacetHandler<FacetDataCache<?>>)getDependedFacetHandler(_dependsOnFacetName);
       
      FacetCountCollector defaultCollector = dependOnFacetHandler.getFacetCountCollectorSource(sel, ospec).getFacetCountCollector(reader, docBase);
      if (defaultCollector instanceof DefaultFacetCountCollector){
        return new BucketFacetCountCollector(_name, (DefaultFacetCountCollector)defaultCollector, ospec, _predefinedBuckets,reader.numDocs());
      }
      else{
        throw new IllegalStateException("dependent facet handler must build "+DefaultFacetCountCollector.class);
View Full Code Here

    {
      @Override
      public FacetCountCollector getFacetCountCollector(BoboIndexReader reader, int docBase)
      {
        FacetDataCache<?> dataCache = (FacetDataCache<?>)reader.getFacetData(_dataHandlerName);
        FacetCountCollector baseCollector = baseCollectorSrc.getFacetCountCollector(reader, docBase);
        return new HistogramCollector<T>(getName(),baseCollector, dataCache, ospec, _start, _end, _unit);
      }
  };
  }
View Full Code Here

    public void setNextReader(BoboIndexReader reader,int docBase) throws IOException{
      ArrayList<FacetCountCollector> collectorList = new ArrayList<FacetCountCollector>();
      sortPostCollectors(reader);
      for (int i=0;i<_collectors.length;++i){
        _collectors[i].setNextReader(reader, docBase);
        FacetCountCollector collector = _collectors[i]._currentPointers.facetCountCollector;
        if(collector != null)
        {
          collectorList.add(collector);
        }
      }
View Full Code Here

TOP

Related Classes of com.browseengine.bobo.facets.FacetCountCollector

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.