Class SearchDocumentsResult
java.lang.Object
io.fluxzero.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 classLightweight metric representation used for logging search result metadata. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the last document in the result list, ornullif no matches were found.intsize()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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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, ornullif no matches were found.This is typically used for pagination (e.g. passing as
lastHitin a follow-up search).
-