Warning: Wix Data APIs currently require the site's code editor to be enabled manually. For this reason, we recommend against using these APIs for developing Wix CLI apps and self-hosted apps.
The Indexes API enables you to create indexes for data collections, to make querying data faster.
An index is a map of a collection's data, organized according to fields that you select. An index increases the speed of queries by providing a query with a shortcut to the information it is looking for. Instead of iterating through every data item in the collection, a query can use the index to skip to potentially relevant items. The larger a collection is, the more time this saves.
With the Indexes API, you can:
To learn about the differences between regular and unique indexes, see Index Types.
It's important to note the following points before starting to code:
$startsWith
, aren't accelerated by an index.