Get started with Optimizely Graph for CMS 13
Optimizely Graph provides a GraphQL-based content delivery layer for CMS 13 that lets you query, search, and retrieve content across channels from a single endpoint. Use Optimizely Graph to power headless front ends, build advanced search experiences, and replace Optimizely Search & Navigation with a cloud-hosted alternative.
For more information about Optimizely Graph, go to the Optimizely Graph overview.
Note If you already use Optimizely Graph on Content Management System (CMS) 12, go to Project migration for CMS 12 with Optimizely Graph.
Prerequisites
Verify the following before you start:
- A running CMS 13 instance with an environment configured.
- Optimizely Graph connected to your CMS 13 instance. Go to Enable Graph service to sync DAM and CMS for instructions.
Enable Optimizely Graph
Register the Optimizely Graph integration in your startup configuration so CMS 13 syncs content to the Graph service.
Add the following code to your startup class:
services.AddContentGraph();Understand the SDK purpose
The .NET (C#) SDK helps developers migrate from Optimizely Search & Navigation to Optimizely Graph. It provides patterns to implement search and content retrieval through a Graph-based approach.
For more information, go to the .NET (C#) SDK overview.
Choose a content search mode
Optimizely Graph supports three search modes. Select the mode that fits your use case.
Content search
Use content search when you need CMS-integrated results. This mode offers the following capabilities:
- Compile-time type safety for filters.
- Data loading through IContentLoader.
- IContent instances in results.
- Content permission and URL enforcement.
Typed search
Use typed search for structured external or global search scenarios. This mode offers the following capabilities:
- Response deserialization into defined contracts.
- Compile-time type safety for filters.
- Support for global search pages and advanced listings.
Untyped search
Use untyped search for maximum flexibility. This mode offers the following capabilities:
- Types and fragments accepted as strings.
- Raw JsonElement results.
- No compile-time type safety.
Implement search functionality
Optimizely Graph enables the following search capabilities across all modes:
- Full-text search with highlighted terms.
- Filters, operators, and logical connectors.
- Fuzzy matching.
- Extension methods for defining filters.
- Locale-based and ID-based queries.
- Sorting, including semantic sorting.
- Cursor-based pagination.
- Autocomplete and query suggestions.
- Variations, facets, and boosting.
- Pinned results.
Configure security and performance
Optimizely Graph includes built-in security and performance features you can configure for your deployment.
Security
The following security features are available:
- Integrated tracking that respects "Do Not Track" settings.
- Authentication through a single API key by default.
- Optional HMAC authentication.
- Authorization through FilterForVisitor, using IPrincipal and locale.
- Option to include deleted documents.
Performance and observability
The following performance and observability features are available:
- Built-in metrics for HttpClient.
- Observability and query categorization.
- Optional caching support.
Understand SDK limitations
The SDK does not replicate all features from Search & Navigation. The following features are not supported:
- Full Language Integrated Query (LINQ) provider.
- Direct link support. Use IContentLoader.GetAncestors() instead.
- Recursive directives. Use IContentLoader.Get() instead.
- Routing. Use IUrlResolver.Route() and ContentLoader.Get() instead.
- Single document retrieval by ID.
- Filtering on the current site.
- Multi-search.
Open the Search Management portal from CMS
In CMS 13.1.3 and later, the Graph Portal item in the CMS navigation bar opens the Search Management portal inside CMS. Use the portal to monitor search performance, curate pinned results, and configure synonyms for your Optimizely Graph instance. You do not need to switch to a separate application.
The Graph Portal item displays only when all of the following are true:
- Your site configuration sets the Optimizely Graph instance ID.
- The user has edit access in CMS, through the CmsEditors or CmsAdmins role by default.
- The user has edit access in CMS.
- An administrator granted the user access to the Optimizely Graph instance in Opti ID Admin Center.
CMS caches the access check for each user for 15 minutes. After an administrator grants or removes access, the Graph Portal item changes within 15 minutes.
Set the instance ID in the Optimizely:ContentGraph section of appsettings.json, or use the Optimizely__ContentGraph__InstanceId environment variable. The following example uses appsettings.json:
"Optimizely": {
"ContentGraph": {
"InstanceId": "YOUR_GRAPH_INSTANCE_ID"
}
}Next steps
- Go to Migrate from Optimizely Search and Navigation to Optimizely Graph for a migration guide.