Package com.browseengine.bobo.docidset

Examples of com.browseengine.bobo.docidset.FilteredDocSetIterator


    for (int i=0;i<100;++i)
    {
      set1.addDoc(2*i);         // 100 even numbers
    }
   
    DocIdSetIterator filteredIter = new FilteredDocSetIterator(set1.iterator())
    {

      @Override
      protected boolean match(int doc)
      {
        return doc%5 == 0;
      }
    };
   
    BitSet bs = new BitSet();
    for (int i=0;i<100;++i)
    {
      int n = 10*i;
      if (n < 200)
      {
        bs.set(n);
      }
    }
   
    try
    {
      int doc;
      while((doc=filteredIter.nextDoc())!=DocIdSetIterator.NO_MORE_DOCS)
      {
        if (!bs.get(doc)){
          fail("failed: "+doc+" not in expected set");
          return;
        }
View Full Code Here

TOP

Related Classes of com.browseengine.bobo.docidset.FilteredDocSetIterator

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.