Skip to main content
Home  ›  Blog

New Search-Indexing in 2sxc 12.02

2sxc Views now let you configure how Dnn should index them, and if you need even more power you can write your own code for this. New in 12.02.

Why Customize Search Indexing?

Dnn has a built in search system which indexes each module one-by-one. 2sxc supports this by giving the indexer all the data that the View would show, but there are various cases where this isn't ideal:

  1. Sometimes a list of items show up on many pages (like an FAQ extract) but should only be indexed on one page (in the FAQ example only on the main FAQ page)
  2. Sometimes a view will show a list of items (like a Blog) but the results should point to a URL which would show the post details
  3. Sometimes a View has a lot of data to help it (like from a Query containing items and categories) but doesn't want to include all the data in the search-index.

How to Customize the Dnn Search Index?

Previously this was possible using code inside the Razor file, but this was very difficult to do and make the Razor file look very technical, which was scary for HTML-focused designers. 2sxc 12.02 now has to great new features:

  1. Most of the common search-scenarios can be directly configured from the View configuration
  2. If you do need code-based customization, this can now be configured to be in a separate .cs file

This is what the new search-configuration looks like in the View configuration (not all fields shown, as this depends on the toggles you set):

You can customize

  1. If view should provide data to the search-index or not
  2. If all the data-streams should be processed or just some of them (especially usefuly in Views which access Queries to get data)
  3. If you want to use custom code to do extra processing

Learn more

Check out the basics documentation and the C# Search docs to discover more. We'll release an updated Blog app soon which will also demo this functionality. 

Love from Switzerland, 
iJungleboy


Daniel Mettler grew up in the jungles of Indonesia and is founder and CEO of 2sic internet solutions in Switzerland and Liechtenstein, an 20-head web specialist with over 800 DNN projects since 1999. He is also chief architect of 2sxc (see github), an open source module for creating attractive content and DNN Apps.

Read more posts by Daniel Mettler