Exclude property from searchText



I've tried [JsonIgnore] on the property and 

SearchClient.Instance.Conventions.ForInstancesOf<PageDataBase>().ExcludeField(x => x.Ikon);

in Global.asax.cs, but reindexing and rebuilding still hits the pages with a string matching Ikon (string, css class icon)


When I inspect the index I find:

"SearchText$$string": "icon-user-md",

Why isn't Ikons value excluded from searchText, just from the document?

How can I solve this? Override searchText (!?)


Thanks in advance!

Aug 12, 2013 16:56


In admin mode you need to "unclick" that the property is searchable. Admin -> Page Types -> Select Page Type -> CLick property-> "unclick"


Aug 16, 2013 8:42

Is there a way to do this by code in EPiServer 7 CMS MVC?

Aug 16, 2013 8:44

Adding [Searchable(false)] worked nicely, thanks for pointing me in the right direction :)

Aug 16, 2013 8:56

Your welcome. For others reading this post with the same concerns. Remember that you have to reindex after changing this for the changes to be propagted to the index.

Aug 16, 2013 10:03
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.