org.apache.lucene.payloads

## Class PayloadSpanUtil

- java.lang.Object
- - org.apache.lucene.payloads.PayloadSpanUtil

-     public class PayloadSpanUtil
      extends 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.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PayloadSpanUtil(IndexReaderContext context)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Collection<byte[]>` | `getPayloadsForQuery(Query query)` Query should be rewritten for wild/fuzzy support.

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### PayloadSpanUtil

          public PayloadSpanUtil(IndexReaderContext context)

      Parameters:
        `context` - that contains doc with payloads to extract
      See Also:
        `IndexReader.getContext()`

  - ### Method Detail

    - #### getPayloadsForQuery

          public Collection<byte[]> getPayloadsForQuery(Query query)
                                                 throws IOException

      Query should be rewritten for wild/fuzzy support.
      Parameters:
        `query` - rewritten query
      Returns:
        payloads Collection
      Throws:
        `IOException` - if there is a low-level I/O error

Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.