November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi Andreas,
I tried the following but no results retrieved in any trial:
var results = client.UnifiedSearchFor(Query, Language.English).GetResult(new HitSpecification(), false);
var results1 = SearchClient.Instance
.UnifiedSearchFor(Query, Language.GetSupportedLanguage(ContentLanguage.PreferredCulture))
.GetResult();
var results2 = SearchClient.Instance
.UnifiedSearchFor(Query, Language.GetSupportedLanguage(ContentLanguage.PreferredCulture))
.GetResult(new HitSpecification(), false);
Can you confirm that your index contains the data you are searching for? (By looking in the index directly using EPiServer admin mode)
Hi, Following are the Index details:
Index named XXXX contains 130 documents
.NET API version: 1.0.0.278
ImageVaultDoc(55)
ImageVaultNonDoc(5)
PageData(70)
I'm able to fetch the results If I use simple Search like:
ITypeSearch<PageData> query = client.Search<PageData>()
.For(Query)
.WithAndAsDefaultOperator()
var result = query.Select(x => new SearchHit
{
PageTitle = x.PageName,
Id = x.PageLink.ID,
Url = x.LinkURL
})
.Track()
.Take(Count)
.GetResult();
But We want to use UnifiedSearch.We are using CMS6 R2.
Following is the code that I have in global.asax.cs:
PageIndexer.Instance.Conventions.ForInstancesOf<PageData>().ShouldIndex(x => x.Category.IsIndexableCategoryList());
SearchClient.Instance.Conventions.ForInstancesOf<PageData>()
.IncludeField(page => page.SearchText())
.IncludeField(page => page.LinkURL)
.IncludeField(page => page.StartPublish)
.IncludeField(page => page.PageTypeName)
.IncludeField(page => page.StopPublish)
.IncludeField(page => page.PageName);
And following is the code in ascx.cs file :
var results1 = SearchClient.Instance
.UnifiedSearchFor(Query, Language.GetSupportedLanguage(ContentLanguage.PreferredCulture))
.GetResult();
var results2 = SearchClient.Instance
.UnifiedSearchFor(Query, Language.GetSupportedLanguage(ContentLanguage.PreferredCulture))
.GetResult(new HitSpecification(), false);
Please suggest ur Ideas If anything I'm missing.
Thanks
I had similar wunder story :)
http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=74013&epslanguage=en
Bottom line for my case was that UnifiedSearch *started* to yield results without any changes either in code or in index content.
Hi All,
I'm able to see my search query is giving the some result count with the following code:
In Global.asax.cs File I have:
SearchClient.Instance.Conventions.ForInstancesOf<PageData>()
.IncludeField(page => page.SearchText())
.IncludeField(page => page.LinkURL)
.IncludeField(page => page.StartPublish)
.IncludeField(page => page.PageTypeName)
.IncludeField(page => page.StopPublish)
.IncludeField(page => page.PageName);
And in ascx.cs :
SearchClient.Instance.Conventions.UnifiedSearchRegistry.Add<PageData>();
var results = SearchClient.Instance
.UnifiedSearchFor(Query, Language.GetSupportedLanguage(ContentLanguage.PreferredCulture))
.GetResult(new HitSpecification(), false);
foreach (EPiServer.Find.UnifiedSearch.UnifiedSearchHit hit in results)
{
litUnifiedSearch.Text += hit.Filename;
}
While debugging I can see other than Excerpt nothing is giving any data about the search hit.
I want to retrieve the properties of Pages like Start Publish, Page Name, LinkUrl,etc.
Any Idea will be a greate help for me.
Thanks
Hi
We are using EPiServer CMS 6 R2.
We would like to use UnifiedSearch in our project.
All the pages in our project are created through CMS mode but not by using page type builder.
I'm not able to use the following code in Global.asax.cs, the error message says EPiServer.Find.IClientConventions does not contain a definition for ForInstanceOf:
Can someone tell me how to include page data in order to use UnifiedSearch
Thanks.