I installed episerver find, set up them with my credentials (for example)
<configuration><configSections><sectionname="episerver.find"type="EPiServer.Find.Configuration, EPiServer.Find"requirePermission="false"/></configSections><episerver.findserviceUrl="http://..."defaultIndex="myindex"/></configuration>And use IClient with init from EPiServer.Find.Client.CreateFromConfig().So when i search something
_client.Search<ArticlePage>().For(query).GetResult();it returns empty collections.In What is problem?Thanks.
I have a few published article pages.
You should use the singleton when making queries. SearchClient.Instance.Search<ArticlePage>().GetResult();
Have you run the indexing job? You need to trigger a first indexing of the site when setting up find for the first time.
Hi. Thanks. but why i can't use IClient and how I can create indexing job ?
SearchClient.Instance provides an object that implements IClient. This specific client is preconfigured to handle CMS content objects in a better way than a standard client. Everything in the documentation where an IClient is used can also be done using SearchClient.Instance.
The indexing job is a scheduled job that ships with Find's CMS-integration so given that you have installed that (referenced EPiServer.Find.Cms.dll) you can simply go to admin mode and run it. Pages and such will be indexed when they are modified using event driven indexing but the scheduled job comes in handy when you have just installed Find on an existing site so that you can do an initial indexing of all content without having to modify it.
Also, it should be added that when you search for pages and such you should use the GetContentResult method or apply a projection using the Select method.