These docs are for v3.2. Click to read the latest docs for v5.0.

Search, Filter and Sort

Search, Filter, Sort

OpenContent data, more specifically multi-item data, can be filtered, sorted or searched.

This feature is based on Lucene.net

This feature needs to be activated by adding the "index: true" in the Manifest.

Once activated the module data will be indexed.
Lucene index is stored in /APP_Data/OpenContent/lucene_index
Tools to analyse lucene index : Luke

After activation, a new menu item "Filter Settings" will be available. Here you can configure how the data should be filtered, search and sorted prior to being made available to the template (via the Model in razor template or via json through webapi).
In the Filter Setting, there is also a button to rebuild the index for the data of that module.

DNN Search integration

To allow your data to be indexed by DNN there are a few things you need to do.

You have to add "dnnsearch": true to your template.
There are some search improvements in version 3.2
One of them is that Open Content now indexes links to items in the search results for Multi-item templates. ("type": "multiple")

From version 3.2 you can also set what Tile will be used in the DNN search results.
You do this by adding "dnnSearchTitle": "{{Title}}" to the template.

When you change the search settings of your tempalte, you mostly have to go to the
"Filer" settings and click [Re-index Module].

Example:

{
    "index": true,	
    "templates": {
        "list": {
            "type": "multiple",
            "title": "List",            
            "main": {
                "template": "list.hbs",
                 "dnnsearch": true,
                 "dnnSearchTitle": "{{Title}}"
            },
            "detail": {
              "template": "detail.hbs",
              "dnnsearch": true,
              "dnnSearchTitle": "{{Title}}"
					
            }
        }
    }
}