public class InformationPage : PageData
{ ...
public virtual string Ingress { get; set; }
...
public virtual XhtmlString MainText { get; set; }
}
I configure Excerpt as following:
SearchClient.Instance.Conventions.UnifiedSearchRegistry.CustomizeDefaultProjection(p =>
p.ProjectExcerptUsing(spec =>
x => x.Ingress ?? x.MainText.AsViewedByAnonymous().AsCropped(100))
);
But when I search and access the Excerpt field of UnifiedSearchHit, I see that it contains the text of Title. For example, if I have following page with a title and ingress:
Lorem ipsum dolor sit amet
Pellentesque est lacus, tincidunt id viverra quis, auctor sit amet eros. Ut et gravida nisl. Cras tincidunt metus in lacus feugiat porta. Vestibulum aliquet accumsan mauris, non consequat ante consectetur porta. Phasellus et lacus mi. Nunc tincidunt nibh vitae magna pellentesque, non mollis arcu mollis. Mauris commodo, ex et porttitor laoreet, purus eros fringilla urna, eget luctus odio felis nec lorem.
The Excerpt of this page looks like following
Lorem ipsum dolor sit amet Pellentesque est lacus, tincidunt id viverra quis, auctor sit amet eros. Ut et gravida nisl. Cras tincidunt metus in lacus feugiat porta. Vestibulum aliquet accumsan mauris, non consequat ante consectetur porta. Phasellus et lacus mi. Nunc tincidunt nibh vitae magna pellentesque, non mollis arcu mollis. Mauris commodo, ex et porttitor laoreet, purus eros fringilla urna, eget luctus odio felis nec lorem.
Note that the Excerpt begins with the title. Anyone exprienced this? How can I solved it without manual sanitation?
I have following page type:
I configure Excerpt as following:
But when I search and access the Excerpt field of UnifiedSearchHit, I see that it contains the text of Title. For example, if I have following page with a title and ingress:
Lorem ipsum dolor sit amet
Pellentesque est lacus, tincidunt id viverra quis, auctor sit amet eros. Ut et gravida nisl. Cras tincidunt metus in lacus feugiat porta. Vestibulum aliquet accumsan mauris, non consequat ante consectetur porta. Phasellus et lacus mi. Nunc tincidunt nibh vitae magna pellentesque, non mollis arcu mollis. Mauris commodo, ex et porttitor laoreet, purus eros fringilla urna, eget luctus odio felis nec lorem.
The Excerpt of this page looks like following
Lorem ipsum dolor sit amet Pellentesque est lacus, tincidunt id viverra quis, auctor sit amet eros. Ut et gravida nisl. Cras tincidunt metus in lacus feugiat porta. Vestibulum aliquet accumsan mauris, non consequat ante consectetur porta. Phasellus et lacus mi. Nunc tincidunt nibh vitae magna pellentesque, non mollis arcu mollis. Mauris commodo, ex et porttitor laoreet, purus eros fringilla urna, eget luctus odio felis nec lorem.
Note that the Excerpt begins with the title. Anyone exprienced this? How can I solved it without manual sanitation?