November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi,
By default the excerpt is fetched from the SearchText field. The default SearchText field is added by including the return value of an extension method named SearchText when indexing pages and blocks. That methods returns a concatenation of all the page's properties that are marked as searchable.
I'm not sure which Language properties you are referring to, but if it's a property that you have in your page type class(es) try marking it with [Searchable(false)].
You can also add a code only property (no setter or with the Ignore attribute) to your page type classes of type string named SearchText and have it return whatever you want in its getter.
Finally, yes, it's possible to change where the excerpt is fetched from but before we go down that route I'd advice trying one of the two options mentioned above :-)
When getting Excerpts from a UnifiedSearchFor<string> it seems to have fetched text from Language properties.
The result is a long list of the languages that the fetched page is translated into, which isn't really that useful information for our users.
So my question is how does Excerpt fetch text and is there a way for us to control what text it fetches/displays?