Mono Support Custom MonoX Search Provider 

Viewed 12630 time(s), 2 post(s), 5/10/2012 5:41:40 PM - by shawndg
5/10/2012 5:41:40 PM
1871 Reputation 252 Total posts

Hi Guys,

I got the whole website up and running with my own custom profiles..

I want to build a search provider and connect it into the MonoX search engine..

Any help here ?

Thanks,

1
5/13/2012 2:06:59 PM
3016 Reputation 428 Total posts

Hi,

I suppose you want to add your custom search functionality which would return results for your custom items. If that is a case then you can take a look at the following steps:

1. Create your own search provider, extend SearchProviderBase class and implement ISearchEngineProvider interface. Implement Search method which will return a list of ISearchEngineResultItem items.

2. Register your search provider in web.config under the SearchEngine, provider tags:

<SearchEngine>
            <providers>
                <add name="YourSearchProvider" type="YourNameSpace.YourSearchProvider, YourDllName" BoldSearchPhrases="true"/>
.
.
.
            </providers>
        </SearchEngine>

Bear in mind that the items from first registered provider will have the biggest priority and will be rendered first in search result.

3. Navigate to the page where you will display search results(SearchResult.aspx in) and include your searchprovider:

<MonoX:Search ID="search1" runat="server" Title='<%$ Code: PageResources.Title_SearchResults %>'>
                                    <SearchProviderItems>
 
                                        <Search:SearchProviderItem Name="YourSearchProvider" Template="Default"></Search:SearchProviderItem>
.
.
.
 
                                    </SearchProviderItems>
                                </MonoX:Search>

Let us know if you need more help regarding search provider.

Regards.

2
This is a demo site for MonoX. Please visit Mono Software for more info.