Hello,
I've been trying to setup a little test console application for Episerver Search & Navigation. This is something that the training course does.
We already have an index that we use for development, and have crawled content in there. I can get results back from within Episerver, so I'm doing something wrong in the console app.
I have a reference to the Episerver.Find.Framework package in Nuget, and this setup in the app.config:
<section name="episerver.find" type="EPiServer.Find.Configuration, EPiServer.Find" requirePermission="false" />
<episerver.find serviceUrl="https://usea02.find.episerver.net/[client secret]" defaultIndex="[Index reference]" />
It's a barebones program (see below), but not returning results. I've even tried using fiddler to glean the differences between what's happening in Epi vs. the console. I've tried using Typed vs. Unified as well.
Would someone kindly point me in the right direction please?
var client = Client.CreateFromConfig();
//var hit = new HitSpecification();
//hit.HighlightTitle = true;
var setup = client.UnifiedSearch(Language.English).ApplyBestBets().For("covid");
//var setup = client.Search<LayoutPageData>().ApplyBestBets().For("covid");
//.ExcludeDeleted().CurrentlyPublished()
if(setup != null)
{
var results = setup.Take(30).GetResult();
//client.Output();
Console.WriteLine($"Results Count={results.TotalMatching}");
foreach (var result in results)
{
Console.WriteLine($"Name = {result.Filename}");
}
}
else
{
Console.WriteLine("Setup is null");
}