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 12236 time(s), 2 post(s) 10.05.2012 17:41:40by shawndg
shawndg

shawndg

10.05.2012 17:41:40
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,
Dieser Inhalt wurde noch nicht bewertet. 
1871 Reputation 252 Total posts
imarusic

imarusic

13.05.2012 14:06:59
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.
Dieser Inhalt wurde noch nicht bewertet. 
3016 Reputation 428 Total posts