Site specific SearchProvider for Content Graph
The package Optimizely.ContentGraph.Cms 4.1.0 introduced a SearchProvider that enables searching within the page tree.
We would like this SearchProvider to respect the Query.SearchRoots property so that searches can be limited to the current page. This would be valuable for us, as we manage more than 60 sites with large amounts of content.
With Find (Search & Navigation), we were able to override the SearchProvider and inject the search root ourselves, for example:
public override IEnumerable<SearchResult> Search(Query query)
{
var startPageId = ContentReference.StartPage?.ID;
var startPage = startPageId > 0 ? startPageId.ToString() : "1";
query.SearchRoots = new[] { startPage };
return base.Search(query);
}
We would appreciate similar flexibility or support in Content Graph so that search queries can be scoped.