Class SearchDocumentsResult
java.lang.Object
io.fluxcapacitor.common.api.search.SearchDocumentsResult
- All Implemented Interfaces:
JsonType
,RequestResult
The result of a
SearchDocuments
request.
This result contains the list of SerializedDocument
matches that satisfied the search query.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Lightweight metric representation used for logging search result metadata. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the last document in the result list, ornull
if no matches were found.int
size()
Returns the number of matched documents.toMetric()
Converts this result into a serializable metrics object that logs match count and timing, instead of full search result payloads.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.fluxcapacitor.common.api.RequestResult
getRequestId, getTimestamp
-
Constructor Details
-
SearchDocumentsResult
public SearchDocumentsResult()
-
-
Method Details
-
toMetric
Converts this result into a serializable metrics object that logs match count and timing, instead of full search result payloads. -
size
public int size()Returns the number of matched documents. -
lastMatch
Returns the last document in the result list, ornull
if no matches were found.This is typically used for pagination (e.g. passing as
lastHit
in a follow-up search).
-