Search Queries

Swarm Storage integrates with Elasticsearch, allowing client applications to list and search metadata on objects stored in the Swarm cluster. Access these operations by applying query arguments that are specific to the search.

See Elasticsearch for Swarm for details on implementing and managing Elasticsearch.

Scope of Searching in Swarm

Swarm Search supports domain-level searching; to search on an entire cluster and iterate across the domains. Swarm looks up objects by the underlying contextid so querying can be performed by context (domain/bucket) name as usual but always get correct query results even if a domain or bucket has been renamed. Swarm generates the final content query after this lookup, which supports a wide range of functionality: 

  • Filter by Name or Value: Filter by an object's name or any metadata (field) using equality checks, greater/less than comparisons, and wildcard matches.

  • Filter by Buckets: Filter the search to certain buckets (context) using greater/less than comparison (for buckets in numbered ranges) or wildcard matches (for buckets that match a prefix pattern). Include the bucket in the URL path to restrict the search to a single bucket.

  • Filter by Object Type: Add the stype argument to filter by one of these Swarm types: domainbucketnamedaliasimmutableunnamed (both alias and immutable), or all.

  • Operate on Metadata Fields: Perform AND and OR operations on the values of metadata fields to find the matching objects.

  • Sort by Value: Sort specification can combine multiple metadata fields, including the context.

  • Paginate large result sets with sort markers. Apply markers when the context is sorted (ascending or descending) and in conjunction with markers for other metadata fields, when the sort specification includes multiple fields.

  • Calculate Disk Usage: The du aggregation filters the results to calculate disk usage, inclusive or exclusive of object replicas in the cluster.

  • Locate Versions: Use the versions argument to surface all historical versions of a single object or of all objects in the context if using versioning.

 

© DataCore Software Corporation. · https://www.datacore.com · All rights reserved.