Try our conversational search powered by Generative AI!

EPiServer Find Searching Two Types


Hi all,

I have EPiServer Find setup on a 7.5 site.

Basically, when a search has been performed I need to return two types only (one of 'BasePage' type and the other of media type 'DocumentFile').  The results page will show a Title, Summary and Url for each search result.

I have tried using the MultiSearch method which binds to a custom object that I have created. However, the result object comes back with two collections (one for BasePages and one for DocumentFiles).  It also appears that MultiSearch does not support pagination as Take() and Skip() arent available for the query.

Has anyone any advice as to the best way of achieving searching on two types, with pagination support and able to bind to a custom object? Do I need to run two seperate queries and amalgamate the results?



Mar 13, 2015 12:35


Please have a look at unified search I think that's what you're looking for.

Mar 14, 2015 7:12

As Johan says, unified search can work but you could also search over multiple types with includetype. We do just that and then returns a custom object.

Read more about it here:

Mar 14, 2015 19:09

Hi Henrik, I like the includetype approach that returns a cusom object.  However, I cannot seem to use 'InField' method to search on certain properties.  Any ideas?



Mar 16, 2015 11:27

I solved it by doing this;

I search for a baseclass and then if user have checked on block that they only want certain types I do something like below. ;

                IList<Type> types = new List<Type>();


                searchQuery = searchQuery.FilterByExactTypes(types as IEnumerable<Type>);

Workes like a charm for me. 

or something like this I guess would be even cleaner;

searchQuery = searchQuery.FilterByExactTypes(new [] {typeof(InformationPage), typeof(ProductPage)});


Oh right, I didn't quite read the whole post :-D Sorry bout that. 

Edited, Apr 09, 2015 10:17
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.