Returns the payload data for the current span. This is invalid until {@link #Next()} is called for the first time. This method must not be called more than once after each call of {@link #Next()}. However, most 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. An ordered SpanQuery does not lazy load, so if you have payloads in your index and you do not want ordered SpanNearQuerys to collect payloads, you can disable collection with a constructor option.
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.

Namespace: Lucene.Net.Search.Spans
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public abstract ICollection<byte[]> GetPayload()
Visual Basic
Public MustOverride Function GetPayload As ICollection(Of Byte())
Visual C++
public:
virtual ICollection<array<unsigned char>^>^ GetPayload() abstract

Return Value

a List of byte arrays containing the data of this payload, otherwise null if isPayloadAvailable is false

See Also