Class PhraseIterablePosting

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, BlockPosting, IterablePosting, Posting

    public class PhraseIterablePosting
    extends ANDIterablePosting
    implements BlockPosting
    Implementation of an IterablePosting for block indices that returns only documents that match a multi-term phase.
    Since:
    3.5
    Author:
    Craig Macdonald
    • Constructor Detail

      • PhraseIterablePosting

        public PhraseIterablePosting​(IterablePosting[] _ips,
                                     EntryStatistics[] _p,
                                     boolean recordPositions)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • PhraseIterablePosting

        public PhraseIterablePosting​(IterablePosting[] _ips,
                                     Pointer[] _p,
                                     boolean recordPositions)
                              throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getPositions

        public int[] getPositions()
        Description copied from interface: BlockPosting
        Return the positions of occurrences of the term in the current document.
        Specified by:
        getPositions in interface BlockPosting
        Returns:
        the positions of occurrences of the term in the current document.
      • createPhrasePostingList

        public static IterablePosting createPhrasePostingList​(Pointer[] ps,
                                                              PostingIndex<Pointer> invIndex,
                                                              boolean savePositions)
                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • createPhrasePostingList

        public static IterablePosting createPhrasePostingList​(java.lang.String[] terms,
                                                              Lexicon<java.lang.String> lex,
                                                              PostingIndex<Pointer> invIndex,
                                                              boolean savePositions)
                                                       throws java.io.IOException
        Throws:
        java.io.IOException