Save This Page
Home » lucene-3.0.1-src » org.apache » lucene » search » spans » [javadoc | source]
org.apache.lucene.search.spans
public interface: PayloadSpans [javadoc | source]

All Implemented Interfaces:
    Spans

WARNING: The status of the Payloads feature is experimental. The APIs introduced here might change in the future and will not be supported anymore in such a case.
Method from org.apache.lucene.search.spans.PayloadSpans Summary:
getPayload,   isPayloadAvailable
Method from org.apache.lucene.search.spans.PayloadSpans Detail:
 public Collection getPayload() throws IOException
    Returns the payload data for the current span. This is invalid until #next() is called for the first time. This method must not be called more than once after each call of #next() . However, payloads are loaded lazily, so if the payload data for the current position is not needed, this method may not be called at all for performance reasons.

    Note that the return type is a collection, thus the ordering should not be relied upon.

    WARNING: The status of the Payloads feature is experimental. The APIs introduced here might change in the future and will not be supported anymore in such a case.

 public boolean isPayloadAvailable()
    Checks if a payload can be loaded at this position.

    Payloads can only be loaded once per call to #next() .

    WARNING: The status of the Payloads feature is experimental. The APIs introduced here might change in the future and will not be supported anymore in such a case.