Package com.kamikaze.docidset.impl

Examples of com.kamikaze.docidset.impl.AndDocIdSet


                  br.setFilter(
                    new Filter(){
                @Override
                public DocIdSet getDocIdSet(IndexReader reader)
                    throws IOException {
                  return new AndDocIdSet(docsets);
                }
                  });
                }
            }
             
View Full Code Here


        RandomAccessDocIdSet s = f.getRandomAccessDocIdSet(reader);
        list.add(s);
        randomAccessList.add(s);
      }
      final RandomAccessDocIdSet[] randomAccessDocIdSets = randomAccessList.toArray(new RandomAccessDocIdSet[randomAccessList.size()]);
      final DocIdSet andDocIdSet = new AndDocIdSet(list);
      return new RandomAccessDocIdSet()
      {
        @Override
        public boolean get(int docId)
        {
          for(RandomAccessDocIdSet s : randomAccessDocIdSets)
          {
            if(!s.get(docId)) return false;
          }
          return true;
        }

        @Override
        public DocIdSetIterator iterator() throws IOException
        {
          return andDocIdSet.iterator();
        }
      };
    }
  }
View Full Code Here

        {
          selSet=selSetList.get(0);
        }
        else
        {
          selSet=new AndDocIdSet(selSetList);
        }
      }
    }
     
    DocIdSet notSelSet=null;
   
    if (notSelectionNodes!=null && notSelectionNodes.length > 0)
    {
      ArrayList<DocIdSet> notSelSetList=new ArrayList<DocIdSet>(notSelectionNodes.length);
      for (SelectionNode selectionNode : notSelectionNodes)
      {
        DocIdSet ds=selectionNode.getDocSet();
       
        if (ds!=null)
        {
          notSelSetList.add(ds);
        }
       
        if (notSelSetList.size()>0)
        {
          if (notSelSetList.size()==1)
          {
            notSelSet=notSelSetList.get(0);
          }
          else
          {
            notSelSet=new OrDocIdSet(notSelSetList);
          }
        } 
      }
    }
   
    if (notSelSet!=null)
    {
      notSelSet=new NotDocIdSet(notSelSet,maxDoc);
    }
   
    if (selSet!=null && notSelSet!=null)
    {
      DocIdSet[] sets=new DocIdSet[]{selSet,notSelSet};
      docSet=new AndDocIdSet(Arrays.asList(sets));
    }
    else if (selSet!=null)
    {
      docSet=selSet;
    }
View Full Code Here

      List<DocIdSet> list = new ArrayList<DocIdSet>(_filters.size());
      for (Filter f : _filters)
      {
        list.add(f.getDocIdSet(reader));
      }
      return new AndDocIdSet(list);
    }
  }
View Full Code Here

                  br.setFilter(
                    new Filter(){
                @Override
                public DocIdSet getDocIdSet(IndexReader reader)
                    throws IOException {
                  return new AndDocIdSet(docsets);
                }
                  });
                }
            }
             
View Full Code Here

    } else if (totalDocIdSetCardinalityEstimate.isZero()) {
      return SenseiDocIdSet.buildMatchNone(plan);
    } else if (docIdSets.size() == 1) {
      return new SenseiDocIdSet(docIdSets.get(0), totalDocIdSetCardinalityEstimate, plan);
    } else {
      return new SenseiDocIdSet(new AndDocIdSet(docIdSets), totalDocIdSetCardinalityEstimate, plan);
    }
  }
View Full Code Here

      return docSetList.get(0);
    }
    else if (docSetList.size()==0) return null;
    else{
      if (isAnd) {
        return new AndDocIdSet(docSetList);
      }
      else{
        return new OrDocIdSet(docSetList);
      }
    }
View Full Code Here

      if (negativeSet==null){
        return positiveSet;
      }
      else {
        DocIdSet[] sets = new DocIdSet[]{positiveSet,new NotDocIdSet(negativeSet, reader.maxDoc())};
        return new AndDocIdSet(Arrays.asList(sets));
      }
    }
    else{
      if (negativeSet==null){
        return EmptyFilter.getInstance().getRandomAccessDocIdSet(reader);
View Full Code Here

TOP

Related Classes of com.kamikaze.docidset.impl.AndDocIdSet

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.