Package org.terrier.structures

Examples of org.terrier.structures.BitPostingIndex


     
     
      //now check correct type of all structures
      BitPostingIndexInputStream bpiis;
      IterablePosting ip;
      BitPostingIndex bpi;
     
      //check stream structures
      bpiis = (BitPostingIndexInputStream) index.getIndexStructureInputStream("direct");
      ip = bpiis.next();
      assertTrue(ip instanceof FieldPosting);
      bpiis = (BitPostingIndexInputStream) index.getIndexStructureInputStream("inverted");
      ip = bpiis.next();
      assertTrue(ip instanceof FieldPosting);
     
      //check random structures
      bpi = (BitPostingIndex) index.getInvertedIndex();
      ip = bpi.getPostings((BitIndexPointer) index.getLexicon().getLexiconEntry(0).getValue());
      assertTrue(ip instanceof FieldPosting);
      bpi = (BitPostingIndex) index.getDirectIndex();
      ip = bpi.getPostings((BitIndexPointer) index.getDocumentIndex().getDocumentEntry(0));
      assertTrue(ip instanceof FieldPosting);
    }
View Full Code Here


        throws Exception
    {     
      //no check correct type of all structures
      BitPostingIndexInputStream bpiis;
      IterablePosting ip;
      BitPostingIndex bpi;
     
      //check stream structures
      bpiis = (BitPostingIndexInputStream) index.getIndexStructureInputStream("direct");
      ip = bpiis.next();
      assertTrue(ip instanceof BlockPosting);
      bpiis = (BitPostingIndexInputStream) index.getIndexStructureInputStream("inverted");
      ip = bpiis.next();
      assertTrue(ip instanceof BlockPosting);
     
      //check random structures
      bpi = (BitPostingIndex) index.getInvertedIndex();
      ip = bpi.getPostings((BitIndexPointer) index.getLexicon().getLexiconEntry(0).getValue());
      assertTrue(ip instanceof BlockPosting);
      bpi = (BitPostingIndex) index.getDirectIndex();
      ip = bpi.getPostings((BitIndexPointer) index.getDocumentIndex().getDocumentEntry(0));
      assertTrue(ip instanceof BlockPosting);
    }
View Full Code Here

TOP

Related Classes of org.terrier.structures.BitPostingIndex

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.