Package com.browseengine.bobo.facets.filter

Examples of com.browseengine.bobo.facets.filter.RandomAccessFilter


      }
      List<String> selVals = entry.getValue();
      if (selVals == null || selVals.size() == 0) {
        continue;
      }
      RandomAccessFilter f = facetHandler.buildRandomAccessOrFilter(selVals.toArray(new String[0]),
        prop, isNot);
      if (f == EmptyFilter.getInstance()) continue;
      filterList.add(f);
    }
View Full Code Here


  }

  @Override
  public RandomAccessFilter buildRandomAccessOrFilter(String[] vals, Properties prop, boolean isNot)
      throws IOException {
    RandomAccessFilter filter = null;

    if (vals.length > 1) {
      RandomAccessFilter f = new FacetOrFilter(this, vals, false);
      filter = new AdaptiveFacetFilter(new FacetDataCacheBuilder() {

        @Override
        public FacetDataCache<?> build(BoboSegmentReader reader) {
          return getFacetData(reader);
View Full Code Here

          if (selections!=null){
            for (BrowseSelection sel : selections){
              String name = sel.getFieldName();
              FacetHandler<?> handler = reader.getFacetHandler(name);
              if (handler!=null){
                RandomAccessFilter filter = handler.buildFilter(sel);
                if (EmptyFilter.getInstance() == filter){
                  valid = false;
                  break;
                }
              }
View Full Code Here

              if (include_upper && to != null && to.length() != 0)
                sb.append("]");
              else
                sb.append(")");
              RandomAccessFilter filter = null;;
              String rangeString = sb.toString();
              if (facetHandler instanceof ActivityRangeFacetHandler) {
                filter = ((ActivityRangeFacetHandler) facetHandler).buildRandomAccessFilter(rangeString, null);
              } else {
                filter = new FacetRangeFilter(facetHandler, rangeString);
              }
              DocIdSet docIdSet = filter.getDocIdSet(reader);
              return new SenseiDocIdSet(docIdSet, DocIdSetCardinality.exact(filter.getFacetSelectivity(boboReader)), getPlan(field, rangeString));
            }
          }
        }

        if(type == null)
View Full Code Here

              if (vals != null)
                uidSel.setValues(vals);
              if (nots != null)
                uidSel.setNotValues(nots);

              RandomAccessFilter raf = uidFacet.buildFilter(uidSel);
              return SenseiDocIdSet.build(raf, boboReader, "<uid> IN <" + StringUtils.join(vals, ", ") + "> NOT IN <" + StringUtils.join(nots, ", ") + ">");
            }
            catch(Exception e){
              throw new IOException(e);
            }
View Full Code Here

      return doc == docid;
    }
  }
 
  private RandomAccessFilter buildRandomAccessFilter(final long val) throws IOException {
    return new RandomAccessFilter() {
     
      /**
       *
       */
      private static final long serialVersionUID = 1L;
View Full Code Here

      }
    };
  }
 
  private RandomAccessFilter buildRandomAccessFilter(final LongSet valSet) throws IOException {
        return new RandomAccessFilter() {
     
      /**
       *
       */
      private static final long serialVersionUID = 1L;
View Full Code Here

      }
      catch(Exception e){
        throw new IOException(e.getMessage());
      }
    }
    RandomAccessFilter filter;
    if (longSet.size()==1){
      filter = buildRandomAccessFilter(longSet.iterator().nextLong());
    }
    else{
      filter =  buildRandomAccessFilter(longSet);
View Full Code Here

    return compositeActivityManager.getActivityValues().precomputeArrayIndexes(uidArray);   
  }

  @Override
  public RandomAccessFilter buildRandomAccessFilter(final String value, Properties selectionProperty) throws IOException {
    return new RandomAccessFilter() {     
      @Override
      public RandomAccessDocIdSet getRandomAccessDocIdSet(BoboIndexReader reader)
          throws IOException {
        final int[] indexes = (int[]) ((BoboIndexReader)reader).getFacetData(_name);
        if (value == null || value.isEmpty()) {
View Full Code Here

    return super.load(reader);
  }
  @Override

  public RandomAccessFilter buildRandomAccessFilter(final String value, final Properties selectionProperty) throws IOException {
    return new RandomAccessFilter() {
      @Override
      public RandomAccessDocIdSet getRandomAccessDocIdSet(final BoboIndexReader reader) throws IOException {
        final RandomAccessDocIdSet docIdSet = (RandomAccessDocIdSet) SynchronizedActivityRangeFacetHandler.super.buildRandomAccessFilter(
            value, selectionProperty).getDocIdSet(reader);
        return new RandomAccessDocIdSet() {
View Full Code Here

TOP

Related Classes of com.browseengine.bobo.facets.filter.RandomAccessFilter

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.