GetResult queries


Hi all,

I'm developing a search, and I can't figure out how to acheive a couple of things when using the GetResult method.

My code looks like so:

var query = SearchClient.Instance
.Skip((this.PagingPage - 1) * CurrentPage.PageSize)

var hitSpec = new HitSpecification
HighlightTitle = CurrentPage.HighlightTitles,
HighlightExcerpt = CurrentPage.HighlightExcerpts,
ExcerptLength = CurrentPage.ExcerptLength

var results = query.GetResult(hitSpec, true);

The issues I have are:

  • In certain scenarios we need to suppress CMS files from being returned in the results. Is building a filter the best way for this?
  • The Excerpt is currently part of the main content on the page. We would like to use a specific field, or if it is blank fallback to EPiServer's FIND's definition of the Excerpt. I thought I would be able to acehive this using Projections, but actually I can't see to use Projections with a unified search. Am I looking at this in the right way? Is there a better way of changing the value of Excerpt?
  • We want to show highlighting in the title and excerpt. I have created a HitSpecification, but I dont think this alone is enough (because it's not working!). Is there something else I also need to do?

Any help would be greatly appreciated.



Oct 31, 2013 13:50
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.