Class PayloadSpanUtil


  • public class PayloadSpanUtil
    extends java.lang.Object
    Experimental class to get set of payloads for most standard Lucene queries. Operates like Highlighter - IndexReader should only contain doc of interest, best to use MemoryIndex.
    • Method Detail

      • getPayloadsForQuery

        public java.util.Collection<byte[]> getPayloadsForQuery​(Query query)
                                                         throws java.io.IOException
        Query should be rewritten for wild/fuzzy support.
        Parameters:
        query - rewritten query
        Returns:
        payloads Collection
        Throws:
        java.io.IOException - if there is a low-level I/O error
      • queryToSpanQuery

        private void queryToSpanQuery​(Query query,
                                      java.util.Collection<byte[]> payloads)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • getPayloads

        private void getPayloads​(java.util.Collection<byte[]> payloads,
                                 SpanQuery query)
                          throws java.io.IOException
        Throws:
        java.io.IOException