Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Default projections can't be customized for Unified search



We've faced with issue that we can't use projections functionality from EPiServer Find.

We tried several different solutions but they don't work. 

So we can't change Unified search behaviour without adding changes to ArticlePage.

We hope someone already faced with this and can help us

Solution 1:

[ModuleDependency(typeof (EPiServer.Web.InitializationModule))]
public class SearchInitialization : IInitializableModule
    public void Initialize(InitializationEngine context)
            .ExcludeField(p => p.Title)
            .IncludeField(p => p.SearchTitle());
    public static class ArticlePageExtension
        public static string SearchTitle(this ArticlePage page)
            return page.Title;

Solution 2:

                    x => x.ProjectTitleFrom(
                        p => p.SearchTitle()));

Solution 3:

                .ProjectTitleFrom(p => p.SearchTitle());

Solution 4:

                .ProjectTitleFrom(p => p.Title);

P.S. EPiServer Find version is

Best regards,


Nov 24, 2015 10:17

Solution 4 is not needed since pages and blocks are by default searchable using unified search.

The way to do it is using a Initializable module (as you have in solution 1) and then use conventions to customize the projection.

If I wanted Title to be projected from a "custom field" I would create an extension method "CustomTitle()" and the add the following inside the module:

                .ProjectTitleFrom(x => x.CustomTitle());
Nov 24, 2015 13:27

We used Initializable module in all solutions. We've tried your code also and it doesn't work.

I think we have some issue that breaks this code but we don't know where we should look for.

Nov 24, 2015 14:06

Ok, I see. If you use the explore view to look at the index, can you see that your extension field is there? What about SearchTitle property?

Nov 24, 2015 14:30

SearchTitle property presents in the index but has default value (Page name). ProjectTitleFrom doesn't change default value to custom.

As the result I boosting functionality will not work properly.

If I use ProjectImageUriFrom function ImageUri property will not appears in the index

Nov 24, 2015 15:58

Any news on this one? 

I have the same problem and tried all of the 4 solutions above and some more workarounds, but nothing works.

I'm trying to change the projected TypeName and nothing happens, it still remains default in the index. 

This is where I am at right now, but it does not change the projection. :

SearchClient.Instance.Conventions.UnifiedSearchRegistry.ForInstanceOf<StandardPage>().ProjectTypeNameFrom(x => x.CustomSearchTypeName());

Where the CustomSearchTypeName just returns a custom string.

Edited, Jan 27, 2016 14:03


We added implementation to ArticlePage. We haven't found another solution.

ArticlePage property:

        public virtual string SearchTitle { get { return this.SearchTitle(); } }

You can use any properties from ISearchContent

Jan 28, 2016 6:40

I just ran into the same issue. It's very dissapointing to see this still hasn't been fixed. Just an example of a projection I'm trying to implement:

                .ProjectTitleFrom(x => string.Format("{0} [{1}]",x.SearchTitle(), x.SearchFileExtension()));

I could add SearchTitle to my custom Media Model as Pavel has suggested but then I won't have access to the file extension property.

Feb 06, 2017 13:52
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.