Class IndexDocuments
java.lang.Object
io.fluxcapacitor.common.api.Request
io.fluxcapacitor.common.api.Command
io.fluxcapacitor.common.api.search.IndexDocuments
- All Implemented Interfaces:
JsonType
Command used to index a collection of
SerializedDocument
instances in the search store.
This command is typically sent to the Flux platform, requesting that the specified documents be stored and made searchable.
Documents can belong to different collections and contain arbitrary facets, indexes, and metadata, allowing them to be used for filtering, searching, and analytics.
Conditional indexing: If ifNotExists
is true
, the platform will only index a
document if no document with the same ID and collection already exists.
Delivery guarantees: The Guarantee
determines the durability of the indexing operation
(e.g. STORED
waits for acknowledgment).
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getSize()
Optionally specifies a routing key for this command, which may be used to partition work or apply consistent hashing when processed in the Flux platform.toMetric()
Converts this object into a compact metric representation for logging or monitoring.toString()
Methods inherited from class io.fluxcapacitor.common.api.Command
getGuarantee
-
Constructor Details
-
IndexDocuments
public IndexDocuments()
-
-
Method Details
-
getSize
public int getSize() -
toString
-
toMetric
Description copied from interface:JsonType
Converts this object into a compact metric representation for logging or monitoring.Used by the Flux client to avoid logging large payloads directly while still tracking platform usage.
- Returns:
- a safe and compact object suitable for serialization to the metrics log
-
routingKey
Description copied from class:Command
Optionally specifies a routing key for this command, which may be used to partition work or apply consistent hashing when processed in the Flux platform.- Overrides:
routingKey
in classCommand
- Returns:
- a routing key string, or
null
if not specified
-