Try our conversational search powered by Generative AI!

Episerver Find - Exclude Fields


If I use the following query, Episerver Find will search in CreateBy and ChangedBy fields:

var searchResult = _findClient.Search()
    .For("some text")

For example, search on Administrator will return all pages that were created by admin.

InField extension doesn't solve the problem because not all classes that implement IMyInterface have the same set of properties.

What would be the most elegant way to solve this? Thanks!

Oct 13, 2017 13:10

Could you use Find conventions to exclude the property from being indexed?

Oct 13, 2017 18:23

You should also be able to solve it in your own SearchText() extension method.

Oct 16, 2017 0:03

I'd like to exclude fields from search, not from the search index.

In Elasticsearch it is possible to do the source filtering, so I was hoping it's possible to achieve the same with Find.

Edited, Oct 16, 2017 9:41
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.