An enumeration of span matches. Used to implement span searching. Each span represents a range of term positions within a document. Matches are enumerated in order, by increasing document number, within that by increasing start position and finally by increasing end position.
More...
|
virtual | ~Spans () |
|
virtual String | getClassName () |
|
boost::shared_ptr< Spans > | shared_from_this () |
|
virtual bool | next ()=0 |
| Move to the next match, returning true if any such exists.
|
|
virtual bool | skipTo (int32_t target)=0 |
| Skips to the first match beyond the current, whose document number is greater than or equal to target.
|
|
virtual int32_t | doc ()=0 |
| Returns the document number of the current match. Initially invalid.
|
|
virtual int32_t | start ()=0 |
| Returns the start position of the current match. Initially invalid.
|
|
virtual int32_t | end ()=0 |
| Returns the end position of the current match. Initially invalid.
|
|
virtual Collection< ByteArray > | getPayload ()=0 |
| 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, 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.
|
|
virtual bool | isPayloadAvailable ()=0 |
| Checks if a payload can be loaded at this position.
|
|
virtual | ~LuceneObject () |
|
virtual void | initialize () |
| Called directly after instantiation to create objects that depend on this object being fully constructed.
|
|
virtual LuceneObjectPtr | clone (const LuceneObjectPtr &other=LuceneObjectPtr()) |
| Return clone of this object.
|
|
virtual int32_t | hashCode () |
| Return hash code for this object.
|
|
virtual bool | equals (const LuceneObjectPtr &other) |
| Return whether two objects are equal.
|
|
virtual int32_t | compareTo (const LuceneObjectPtr &other) |
| Compare two objects.
|
|
virtual String | toString () |
| Returns a string representation of the object.
|
|
virtual | ~LuceneSync () |
|
virtual SynchronizePtr | getSync () |
| Return this object synchronize lock.
|
|
virtual LuceneSignalPtr | getSignal () |
| Return this object signal.
|
|
virtual void | lock (int32_t timeout=0) |
| Lock this object using an optional timeout.
|
|
virtual void | unlock () |
| Unlock this object.
|
|
virtual bool | holdsLock () |
| Returns true if this object is currently locked by current thread.
|
|
virtual void | wait (int32_t timeout=0) |
| Wait for signal using an optional timeout.
|
|
virtual void | notifyAll () |
| Notify all threads waiting for signal.
|
|
An enumeration of span matches. Used to implement span searching. Each span represents a range of term positions within a document. Matches are enumerated in order, by increasing document number, within that by increasing start position and finally by increasing end position.
virtual Collection< ByteArray > Lucene::Spans::getPayload |
( |
| ) |
|
|
pure virtual |
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, 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.
- Returns
- a List of byte arrays containing the data of this payload, otherwise null if isPayloadAvailable is false
Implemented in Lucene::NearSpansOrdered, Lucene::NearSpansUnordered, and Lucene::TermSpans.
virtual bool Lucene::Spans::skipTo |
( |
int32_t |
target | ) |
|
|
pure virtual |