search single

This block is part of the storage group and was last modified in core v13.0.4.

Storage Selection Required

This block relies on a storage to perform its storage releated actions. You must manually select the storage you want to use in your flow using the storage selector modal. To access the modal, click the white button on the block.

search single v10.6.2 Updated v13.0.4

searches in the given storage based on a query and returns maximum one result.

In pins 3 + flow
  • flow
    flow
  • Query required
    query

    Search will return cached results by default. Turn this behaviour off by adding Disable cache to this query. • Suggestions: query_bool_must query_bool_must_not query_bool_should

  • Cache Key v13.0.4
    value

    You can use this option to serve cached results for frequently used and resource-intensive searches. If the data doesn't change, repeated searches with the same cache key retrieve results from the same request cache. For time series use cases, such as logging, data in older data is rarely updated and can be served directly from this cache.

  • Storage
    storage
Out pins 5 + flow
  • flow
    flow
  • Result
    object

    The result if one has been found.

  • guid
    value

    The guid of the result if one has been found.

  • Has result
    condition
  • success
    condition
  • error
    value
database

search single is search for exactly one document: the query pins work the same (a term from fields inside must), and the has result pin tells a branch whether anything matched before get fields reads the object.

Studio canvas example for the search single block: searching for one document.

Commonly used with

In production blueprints, this block is most often wired together with:

  • branch: wired in both directions with this block.
  • get fields: this block feeds into it. Gets the selected fields from the given object.
  • must: feeds into this block. All queries provided must match.
  • filter: feeds into this block. Build a custom query using higher-level bool query.
  • update document: this block feeds into it. Update document in the given storage and creates a revision for it.
  • multiple: feeds into this block.

Used in these guides

These documentation pages use or explain this block:

Version history

Introduced in v10.6.2.

Last modified in v13.0.4.


Back to storage Return to the main group to view all sub-groups Back to storage Return to the group to view all blocks within this group