Increase number of hits returned from internal search

Vote:
 

Hi,

Is it possible to increase the number of hits returned from the search inside EPiServer Edit Mode? I'm talking about the search box above the page tree. I'm getting 10 hits there now, but I would like it to return some more.

-- 
Tarjei Olsen

#117086
Feb 11, 2015 12:47
Vote:
 

If you're referring to the shell search, I believe it is hard coded to return only the first 10 - http://world.episerver.com/Forum/Developer-forum/Developer-to-developer/Thread-Container/2012/5/EpiServer-internal-search/

#117117
Feb 11, 2015 22:22
Vote:
 

Ok, it isn't configurable, but I can code my way around it:

[SearchProvider]
public class InternalPageSearchProvider : PageSearchProvider
{
    //enourmous constructor signature passing everything along to base()

    //override Category to set a new name

    public override IEnumerable<SearchResult> Search(Query query)
    {
        query.MaxResults = 1337;
        return base.Search(query);
    }
}

This is picked up as a provider, and I can drag/drop it on top of the provider list in the Admin UI. Bam! I have more than 10 results when doing internal/shell searches.

-- 
Tarjei

#117212
Feb 13, 2015 14:53
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.