SaaS CMS has officially launched! Learn more now.

Url property is not indexed



I've created a Url property like this:

public virtual Url MyUrl { get; set; }

When I get search hits (projections) using EPiServer Find 10, MyUrl is empty.

I've also checked the search index in EPiServer CMS by navigating to Find / Overview; MyUrl field is not indexed.

The property is properly stored into a database. I can fetch it using ContentLoader / ContentRepository.

Has anyone run into the same problem?

Oct 07, 2015 16:32

Have you tried marking it as searchable? [Searchable(true)]

Oct 07, 2015 21:27

Hi Johan,

[Searchable(true)] didn't solve the problem.

Oct 08, 2015 10:44

I think the Url type is excluded by default.

Perhaps you could add the field as a string. Add the following to an initializable module:

 SearchClient.Instance.Conventions.ForInstancesOf<StartPage>().IncludeField(x => x.CrazyUrl.ToString())

Remember to reindex! :-)

Tip: In situatiions like this you might want to check out EPiCode.InspectInIndex

Oct 08, 2015 11:06

I don't see IncludeField in that namespace anymore. Is there an alternative in the newer APIs? (EPiServer.Find.Cms version is

Mar 01, 2017 12:05

It's still the same.
It's in EPiServer.Find.ClientConventions in EPiserver.Find.dll

Mar 01, 2017 12:18

Ah, thanks that make sense - I was missing the ClientConventions bit i.e.

ContentIndexer.Instance.Conventions.ForInstancesOf<Fixture>().IncludeField(x => x.Tickets); //fail

Whereas this looks like it will work:

SearchClient.Instance.Conventions.ForInstancesOf<Fixture>().IncludeField(x => x.Tickets);

Mar 01, 2017 12:36
* 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.