Tutorial: Search Integration

Integrating Configurations into the Search Indexer

By Kevin M Schreiner

March 31, 2010

 

Introduction

Using OpenWebStudio to integrate the Custom Data within your module into the mix of the data provided within the DotNetNuke search Results is simple. Let's consider the following configuration.

For further information on Search, refer to the Action:Search documentation.

Demonstration

Video
Tutorial: Watch and Learn

 

As you can see here, I am listing all the contents of the Forum Theme Default Images directory. This was performed to generate the HTML for a blog post I created a few moments ago.

 

Now, lets assume what I want to do is make sure that this content appears within the DotNetNuke native Search results and that each file itself is separately index. To do this, I merely need to return to my configuration, and make a few adjustments.

First and foremost, I need to tell ows how to handle an incoming Search Index request, this happens when the Search Scheduler event hits my module and wants to index my content. To make this configuration announce to the OWS runtime that it is capable of handling the Search Indexing, Add a Region and set it to Include the child actions within the Sequence during the Search Integration request.

Now, for the second, and final, step in the operation. The Child Actions of this region will now execute when the Search Indexer hits this module. By using the Search Action, we can instruct the module on exactly which content should be included. Add a Search action as the child of the Region we just created.

 

Now, specify the Query used to obtain the content - this identifies what will be placed into the Indexer. Next, Fill out the additional parameters which identify how it will look in the index, as well as what content should be indexed from the result.

 

In this sample I have set the following:

 

Title: [Name]

Published Date: [CreationTime]

Link Parameters: filename=[Name]

Search Key: [Name]

Description: Forum Template Image [Name]

Content: [COALESCE,Name,,"{REPLACE:_,char(32)}","{REPLACE:.,char(32)}"] [$Fullname,{FILE.IMAGE.DIMENSIONS}]

 

Because of the Nature of OWS, the above value are executed and rendered at the time of assignment, which means that functional tokens, like format and coalesce will also be executed, therefore the Content value above would end up yeilding "Name" as the value. In this case we would need to escape the tokens so that they are still present at the time of binding, so the Content should be changed to this:

 

\[COALESCE,Name,,"\{REPLACE:_,char(32)\}","\{REPLACE:.,char(32)\}"\] \[$Fullname,\{FILE.IMAGE.DIMENSIONS\}\]

 

Now, ReIndex the Content and you are ready to rock!

 

 

Average ( Ratings):
 
Want to help out?
 
 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seattle, WA • info@openwebstudio.com

Bookmark & Share Bookmark and Share