Class LucenePostingsList

java.lang.Object
es.uam.eps.ir.relison.content.index.structure.lucene.LucenePostingsList
All Implemented Interfaces:
PostingsList, java.lang.Iterable<Posting>
Direct Known Subclasses:
LucenePositionalPostingsList

public class LucenePostingsList
extends java.lang.Object
implements PostingsList
Lucene posting list.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    (package private) int length
    The length of the posting list
    protected org.apache.lucene.index.PostingsEnum postings
    The posting list.
  • Constructor Summary

    Constructors 
    Constructor Description
    LucenePostingsList​(org.apache.lucene.index.PostingsEnum postings, int length)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    java.util.Iterator<Posting> iterator()
    Iterator for the list.
    int size()
    Obtains the length of the list.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Field Details

    • postings

      protected org.apache.lucene.index.PostingsEnum postings
      The posting list.
    • length

      int length
      The length of the posting list
  • Constructor Details

    • LucenePostingsList

      public LucenePostingsList​(org.apache.lucene.index.PostingsEnum postings, int length)
      Constructor.
      Parameters:
      postings - the posting list.
      length - the length of the posting list
  • Method Details

    • iterator

      public java.util.Iterator<Posting> iterator()
      Iterator for the list.
      Specified by:
      iterator in interface java.lang.Iterable<Posting>
      Returns:
      the iterator if everything is OK, null otherwise.
    • size

      public int size()
      Obtains the length of the list.
      Specified by:
      size in interface PostingsList
      Returns:
      the length of the posting list.