Class IndexDocuments

All Implemented Interfaces:
JsonType

public class IndexDocuments extends Command
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:
  • Constructor Details

    • IndexDocuments

      public IndexDocuments()
  • Method Details

    • getSize

      public int getSize()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toMetric

      public IndexDocuments.Metric 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

      public String 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 class Command
      Returns:
      a routing key string, or null if not specified