DotNetNuke Blog

Current Blog | | Search |

Adding Search Providers To Venexus Search  By tmunn
Friday, October 17, 2008 11:10 AM :: 551 Views :: 0 Comments :: Article Rating :: DotNetNuke, Modules Send A Message

Within Venexus Search it is possible to add additional search engines.  By default, users can be given the option to choose between portal search and web search.  This must be enabled in the module settings.

For Allow User Chosen Search Type select either: Default To Web or Default To Site.  Doing so will not only search the web or portal only, but it will give users the option to select between the two(web & site), and allow admins to add custom search providers.  Once a type is selected in the module settings, click update.

Once Allow User Chosen Search Type is enabled, the search types can be selected by clicking on the image that is on the left side of the search box.  Admins will have the option to Manage Search Providers.  Click here to add additional options.

Click the "+" symbol next to Add Custom Provider and you will be given a form to do so.

  • URL: Add the URL to the custom search provider.
  • Name: Add the name of the custom search provider.
  • Icon: If the custom search provider has an icon/logo, you can point to it here.
  • Controller Class(optional): If you wish to use API, then enter the controller class here.
  • Controller Options(optional): If you wish to use API, then enter the API key here.

Filling out the URL and Name will simply create an option in the search box drop down list for the provider.  When the provider is selected and a querry is performed, the user is redirected to that provider's site with the results returned from the querry.  In other words, say you selected Google, for example, and searched for "dogs".  You would be redirected to the Google results page for a search on "dogs".

Filling out the Controller Class and Controller Options will pull in search results from the provider when Web is selected from the search box drop down list and the number of results returned is less than the number in the Minimum Results Before API field, in the module settings.
In this case, if the user selects Web search and the number of results returned is less than 20.  Then results will be pulled in from Google(or whatever custom search providers have been set up with the Controller Class and Controller Options).

Below are examples for Google, Yahoo!, and Live.

Google

If you want to use API for Google

  • Set the Controller Class field to: Venexus.VenexusSearch.WebSearchProviders.Google,VenexusWebSearchProviders
  • Enter your Google API key in the Controller Options text box. Make sure to put key= in front of it, as shown in the picture above.

 

 

Yahoo!

If you want to use API for Yahoo!

  • Set the Controller Class field to: Venexus.VenexusSearch.WebSearchProviders.Yahoo,VenexusWebSearchProviders
  • Enter your Yahoo! API key in the Controller Options text box. Make sure to put key= in front of it, as shown in the picture above. CultureInfo=en will make it so only results in english are returned. Make sure to put a comma after the key when using this option(ex - " key=your key here ,CultureInfo=en").

 

 

Live

 If you want to use API for Live

  • Set the Controller Class field to: Venexus.VenexusSearch.WebSearchProviders.Live,VenexusWebSearchProviders
  • Enter your Live API key in the Controller Options text box. Make sure to put key= in front of it, as shown in the picture above. CultureInfo=en-US will make it so only results in english are returned. Make sure to put a comma after the key when using this option(ex - " key=your key here ,CultureInfo=en-US").

 

 

Once you have added some custom search providers, they will populate under Existing Providers.

You can edit the custom providers here by clicking on the pencil icon.  Or delete by clicking the red X.  Click Return to Main and you can see the new providers populated in the search box drop down list.

Now users can choose among the newly created search providers.

Comments
Only registered users may post comments.
 Print   

 © 2007 - Venexus, Inc. - All rights reserved Terms Of Use | Privacy Statement