Printable Version Printable Version Recommend Recommend Email to a friend Email to a friend

Customizing Your DNN Search Results - Part 1/3

7 min : 38 sec

Learn how to create customized search results that leverage DNN's lucene index data. I want to take the next step of showing developers how to create custom search results that can query the lucene data in very specific ways to present the results exactly the way you, or your client, needs them. This is part 1 of 3.

Introduction

Learn how to create customized search results that leverage DNN's lucene index data. At last year's DNNCon, Ash Prasad presented a great session about the newly redesigned search engine in DNN 7.1 and above. He discussed the search architecture, lucene concepts, and the new ModuleSearchBase class for allowing developers to inject data into the index. This year, I want to take the next step of showing developers how to create custom search results that can query the lucene data in very specific ways to present the results exactly the way you, or your client, needs them.

Custom Search Results Module

The Custom Search Results module was built using the Module Creator and uses the Handlebars javascript template framework. Download the zip file (DotNetNuclear_HandlebarsCustomResults.zip). Follow these instructions to install:

Instructions:

  1. Login as Host
  2. Create a page
  3. On the admin ribbon, select Modules > Create Module
  4. Drop an instance of the Module Creator module onto the page
  5. Enter the following settings:
    • Owner Name: DotNetNuclear
    • Module Name: CustomSearch
    • Language: C#
    • Template: Module - User Control
    • Control Name: View
  6. You should now have a working and registered module in the /DesktopModules/DotNetNuclear/CustomSearch folder. Replace the files in this folder with the ones in the DotNetNuclear_HandlebarsCustomResults.zip file.

Client-centric Module w/ Search

This module shows off several techniques: knockout/WebAPI front end, ModuleSearchBase implementation, and Lucene search. Follow the instructions to install:

  1. Download the DotNetNuclear.SearchContent.zip file
  2. Unzip the project folder (DotNetNuclear.SearchContent) under the \DesktopModules folder
  3. Open Visual Studio 2012 or 2013 as an Administrator and open the project
  4. Build project in Release mode
  5. Install the \install\*_Install package in Host > Extensions
  6. Create a test page and drop an instance of the module on the page

Prerequisite Training for this session

This is a more advanced topic in module development. Some topics like WebAPI services development, Knockoutjs, ModuleSearchBase, in addition to basic module development are assumed when reviewing this material. If you are not familiar with some of these topics, no problem! I have lots of training videos here and on DNNHero.com to get you up to speed.

Essential DNN Module Development
WebAPI Services and Knockoutjs
Other tutorials

Related Files


Do you have a question? Ask on our Forum!

Try FREE
30 days money back guaranteed