Try our conversational search powered by Generative AI!

Excerpt being build incorrectly

Vote:
 

I have following page type:

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?

#160635
Edited, Sep 30, 2016 15:03
Vote:
 

Reindex / republish page help?

#160636
Sep 30, 2016 15:06
Vote:
 

Nope...

#160656
Oct 01, 2016 8:26
* 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.