Search API
Search functionality allows searching for documents within the CMS console, as well as on frontend.
Search API contains interfaces through which one can
- define what data should be indexed, define facets and how the indexed values should be previewed;
- perform search queries;
- implement a custom search provider.
Supported search query features:
- Full text search
- Faceted search
- Search results pagination and sorting
- Highlighting matched text fragments
To enable search functionality on a site one should
- Install a search provider package (f.e. Orckestra.Search.LuceneNET or a custom one).
- Mark custom data types and respective fields within them as searchable.
- If needed, using the API configure the way the custom data is indexed.
To add the a search page to a C1 website, one can either use the Orckestra.Search.WebsiteSearch package or implement it using the search API and following the examples.
API Overview
- Enabling search for custom data types
- Customizing field indexing
- Creating custom search documents
- Querying search index
- Website search example 1
A simple example for frontend search.
- Website search example 2
A example of search in a custom data type, including faceted search and search results sorting.
- Implementing your own search provider