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:
- 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)
- 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
- 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:
- Most of the common search-scenarios can be directly configured from the View configuration
- 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
- If view should provide data to the search-index or not
- If all the data-streams should be processed or just some of them (especially usefuly in Views which access Queries to get data)
- 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