header-logo
Learn how to use Wix to build your site and business.
Design and manage your site using intuitive Wix features.
Manage subscriptions, plans and invoices.
Run your business and connect with members.
Learn to purchase, connect or transfer a domain to your site.
Get tools to grow your business and web presence.
Boost your visibility with SEO and marketing tools.
Get advanced features to help you work more efficiently.
Find solutions, learn about known issues or contact us.
placeholder-preview-image
Improve your skills with our courses and tutorials.
Get tips for web design, marketing and more.
Learn to increase organic site traffic from search engines.
Build a custom site using our full-stack platform.
Get matched with a specialist to help you reach your goals.
placeholder-preview-image

CMS: Adding an Index for Your Collection

2 min
Think of your collection as a database full of information. This information is your content. In order for your content to appear on a page, the CMS (Content Management System) finds it by carrying out a database search. The more content you have, the longer it takes the CMS to find what it is looking for.
User inputs also impact database searches. A page can have a drop-down input to display a list of options from a collection. When site visitors click on the drop-down, they are searching your collection (or database).
An index (or database index) maps the structure of your data. This way, a data search has a shortcut to the information it is looking for. The data recovery is faster because it doesn't have to search the entire database every time.
If you expect your collection to contain many items, an index will reduce the time spent on data searches. This improves the end user experience.

To set up an index for your collection:

  1. Go to CMS in your site's dashboard. 
  2. Click the relevant collection.
  3. Click the More Actions drop-down at the top right and select Indexes
A screenshot of a collection in the Content Manager, highlighting the Indexes option.
  1. Click + New Index.
  2. Type a name for your index in the Index Name field.
  3. Click the Type drop-down to select a regular or unique index:
    • Regular: Create an index using up to 3 fields with a diverse range of values. Fields with a narrow range of values, like Boolean fields, do not make good indexes. Click the Choose a field drop-down and select a field on which to base your index. Click + Add Field to add more fields.
    • Unique: Create an index with fields that won't have duplicate values (e.g. ID number or email address). A unique index is limited to 1 field. Click the Choose a field drop-down and select a field on which to base your index. Learn more about unique indexes in Velo by Wix. 
  4. Click the Sort drop-down to select Ascending or Descending for each field.
  5. Click Save.
Next:
Learn more about Indexes and Wix Data Collections in Velo by Wix.