Repositories

Dynamicweb 9 features a lightning fast generalized search framework usually referred to as New Indexing, which can be used to index and search through all kinds of data on your solution – productscontentusers, etc.

Broadly speaking, New Indexing consists of the following elements:

  • Indexes – which are data structures optimized for data retrieval
  • Queries – which are used to retrieve data based on criteria you define
  • Facets – which are used to create filters in frontend
  • Tasks – which are used to rebuild indexes at an interval

All of these elements exist inside a Repository - which is basically a folder in the file system containing a configuration files.

The primary function of a repository is therefore to help you organize your indexes and queries in a way that makes sense to you. In a typical scenario, you will have a repository for indexing users, one for indexing products, and perhaps one for indexing content, but you can create as many repositories as you like (Figure 1.1).

 

To create a repository:

  • Go to Settings
  • Right-click the Repositories node and select New repository
  • Name it
  • Click OK

A repository can contain the following elements:

  • Index definitions – which are instructions for building an index
  • Queries – which are used to retrieve data based on the criteria you define
  • Facets – which are used to create filters in frontend
  • Tasks – which are used to rebuild indexes at an interval

You should add them in that order – facets are dependent on queries, which are dependent on an index, etc.

All of these elements can be found in Files/System/Repositories/YourRepositoryName – and can be moved to other solutions by simply copying the repository folder from one solution to the other. The actual index files are not placed in this folder, but as soon as the index is rebuilt on the new solution they will be created.

Repositories can only be created by Admin and Administrator users, but any user with backend privileges can edit an existing repository.

Get started now

If you’re just looking to get started with implementing search in your shop, take a look at these tutorials which should take you most of the way:


Implementing free-text search


Using Facets to filter a product list


Implementing typeahead search


Implementing a PriceRange query