Class DefaultDocumentStore.DefaultSearch
java.lang.Object
io.fluxcapacitor.javaclient.persisting.search.DefaultDocumentStore.DefaultSearch
- All Implemented Interfaces:
Search
- Enclosing class:
DefaultDocumentStore
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
-
Field Summary
Fields inherited from interface io.fluxcapacitor.javaclient.persisting.search.Search
defaultFetchSize
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFilters documents with timestamps before the given time.constraint
(Constraint... constraints) Adds one or more custom constraints to the search using a logical AND.delete()
Deletes all matching documents in the current search.Excludes specific fields from the returned documents.Returns facet statistics for the current search.<T> List
<T> fetch
(int maxSize) Fetches up to the given number of matching documents and deserializes them to the stored type.<T> List
<T> Fetches up to the given number of documents and deserializes them to the specified type.fetchHistogram
(int resolution, int maxSize) Computes a histogram for the timestamp distribution of matching documents.fetchHitStream
(Integer maxSize, Class<T> type) fetchHitStream
(Integer maxSize, Class<T> type, int fetchSize) Groups search results by field(s) and supports aggregations.includeOnly
(String... paths) Includes only the specified fields in the returned documents.Filters documents within a specified time range.Filters documents with timestamps since the given start time.Skips the first N results.Sorts results by a field, with control over the sort direction.Sorts results by full-text relevance score.sortByTimestamp
(boolean descending) Sorts results by timestamp.Streams raw search hits (document + metadata).streamHits
(int fetchSize) Streams raw search hits (document + metadata).streamHits
(Class<T> type) Streams raw search hits (document + metadata).streamHits
(Class<T> type, int fetchSize) Streams raw search hits (document + metadata).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.fluxcapacitor.javaclient.persisting.search.Search
aggregate, all, any, anyExist, atLeast, before, beforeLast, below, between, count, fetchAll, fetchAll, fetchFirst, fetchFirst, fetchFirstOrNull, fetchFirstOrNull, inLast, inPeriod, lookAhead, match, match, matchFacet, matchMetadata, not, query, since, sortBy, sortByTimestamp, stream, stream, stream, stream
-
Constructor Details
-
DefaultSearch
protected DefaultSearch()
-
-
Method Details
-
since
Description copied from interface:Search
Filters documents with timestamps since the given start time. -
before
Description copied from interface:Search
Filters documents with timestamps before the given time. -
inPeriod
Description copied from interface:Search
Filters documents within a specified time range. -
constraint
Description copied from interface:Search
Adds one or more custom constraints to the search using a logical AND.- Specified by:
constraint
in interfaceSearch
-
sortByTimestamp
Description copied from interface:Search
Sorts results by timestamp.- Specified by:
sortByTimestamp
in interfaceSearch
- Parameters:
descending
- whether to sort in descending order
-
sortByScore
Description copied from interface:Search
Sorts results by full-text relevance score.- Specified by:
sortByScore
in interfaceSearch
-
sortBy
Description copied from interface:Search
Sorts results by a field, with control over the sort direction. -
exclude
Description copied from interface:Search
Excludes specific fields from the returned documents. -
includeOnly
Description copied from interface:Search
Includes only the specified fields in the returned documents.- Specified by:
includeOnly
in interfaceSearch
-
skip
Description copied from interface:Search
Skips the first N results. -
streamHits
Description copied from interface:Search
Streams raw search hits (document + metadata). Documents will typically be fetched in batches from the backing store. For thedefault implementation
, the fetch size is 10,000.- Specified by:
streamHits
in interfaceSearch
-
streamHits
Description copied from interface:Search
Streams raw search hits (document + metadata). Documents will be fetched in batches of sizefetchSize
from the backing store. For thedefault implementation
, the fetch size is 10,000.- Specified by:
streamHits
in interfaceSearch
-
streamHits
Description copied from interface:Search
Streams raw search hits (document + metadata). Documents will be fetched in batches of sizefetchSize
from the backing store. For thedefault implementation
, the fetch size is 10,000.- Specified by:
streamHits
in interfaceSearch
-
streamHits
Description copied from interface:Search
Streams raw search hits (document + metadata). Documents will be fetched in batches of sizefetchSize
from the backing store. For thedefault implementation
, the fetch size is 10,000.- Specified by:
streamHits
in interfaceSearch
-
fetch
Description copied from interface:Search
Fetches up to the given number of matching documents and deserializes them to the stored type. Returns the deserialized values as instances of typeT
. -
fetch
Description copied from interface:Search
Fetches up to the given number of documents and deserializes them to the specified type. -
fetchHitStream
-
fetchHitStream
-
fetchHistogram
Description copied from interface:Search
Computes a histogram for the timestamp distribution of matching documents.- Specified by:
fetchHistogram
in interfaceSearch
-
groupBy
Description copied from interface:Search
Groups search results by field(s) and supports aggregations. -
facetStats
Description copied from interface:Search
Returns facet statistics for the current search.- Specified by:
facetStats
in interfaceSearch
-
delete
Description copied from interface:Search
Deletes all matching documents in the current search.
-