Discovery Queries
The Discovery API has three top level queries for browsing, searching and autocomplete. There are all optimized for read performance.
Browse queries
Browse queries are your goto for fetching items of a given shape for your Crystallize tenant. The browse queries has the same powers as the search query with search, filtering, faceting and pagination capabilities.
Typical use cases:
- Fetching all products from a specific path
- Fetching all categories
- Fetching the last blog posts matching a topic
See a sample query below of a browse query.
Fetching snippet...
Search queries
While search queries have much the same capability as browse queries. However it is searching across a all shapes in your tenant. This also means that the result from the search query can be of multiple shapes so you have to manage this in your query.
Fetching snippet...
Autocomplete queries
The autocomplete queries are designed to be used for partial matching and typically returning a small subset of the data available via search and browse.
Use case:
- typeahead in search
- auto completion of input fields
Fetching snippet...