Class LucenePositionalIndex<C>

java.lang.Object
es.uam.eps.ir.relison.content.index.AbstractIndex<C>
es.uam.eps.ir.relison.content.index.lucene.LuceneIndex<C>
es.uam.eps.ir.relison.content.index.lucene.LucenePositionalIndex<C>
Type Parameters:
C - type of the contents.
All Implemented Interfaces:
DocumentMap<C>, Index<C>

public class LucenePositionalIndex<C>
extends LuceneIndex<C>
Lucene implementation of a positional index.
  • Constructor Details

    • LucenePositionalIndex

      public LucenePositionalIndex​(java.lang.String path, org.ranksys.formats.parsing.Parser<C> cParser) throws java.io.IOException
      Constructor.
      Parameters:
      path - Path to the index.
      cParser - content parser.
      Throws:
      java.io.IOException - if something fails while reading the index.
  • Method Details

    • getPostings

      public PostingsList getPostings​(java.lang.String term) throws java.io.IOException
      Description copied from interface: Index
      Obtains the posting list of a term.
      Specified by:
      getPostings in interface Index<C>
      Overrides:
      getPostings in class LuceneIndex<C>
      Parameters:
      term - the term to look up.
      Returns:
      the posting list of the term.
      Throws:
      java.io.IOException - if something fails while reading the posting list.