MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Custom MonoX Search Provider  (Mono Support )

Viewed 11734 time(s), 2 post(s) 5/10/2012 5:41:40 PMby shawndg
shawndg

shawndg

5/10/2012 5:41:40 PM
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,
This content has not been rated yet. 
1871 Reputation 252 Total posts
imarusic

imarusic

5/13/2012 2:06:59 PM
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.
This content has not been rated yet. 
3016 Reputation 428 Total posts