1
votes

I want to implement a couple of DotNetNuke custom search crawlers as mentioned in this 7.1 release note: http://www.dnnsoftware.com/community-blog/cid/153947/Search-Done-Right-in-DNN

One will be for users, to create a directory function (it looks like this is not included out of the box).

One will be for a proprietary API.

The release note mentions you can add your own crawlers in, but I can't find any documentation on how to do this, or anything on the net at large, and I'm a bit lost ion the DNN source trying to find what classes the default crawler is, let alone how to implement and install a new one.

I've also looked at Aricie, which doesn't work in 7.1 yet, and Search Boost, which would be great if the autocomplete results were actual results rather than keywords.

Has anyone looked at implementing a custom crawler yet? Is this functionality just too new? Can anyone help with where to look in the DNN source for help?

[EDIT]

I've found the DotNetNuke.Services.Search.IndexingProvider class and created a test provider to add some dross to the index; I have no idea how to register this provider with the search engine though; the code in DotNetNuke.Services.Search.SearchEngine seems to have hardcoded references to the providers it runs - surely must be a config way of doing this?

1
Out of curiosity you may want to have a look at the latest version of our LuceneSearch module (v1.8); i published it on codeplex and it is compatible with DNN 7.1.samy

1 Answers

2
votes

Whelkaholism,

I went Ash Prasad's Lucene.NET session at the DNNCon this past weekend. To implement a custom crawler, you implement the DotNetNuke.Services.Search.Controllers.BaseResultController abstract class by creating overrides for the two methods: HasViewPermission and GetDocUrl. Then you register this as a SearchType (DotNetNuke.Services.Search.Entities.SearchType). I can't find a controller method in the API to create a SearchType, so you may need to just add a record to the SearchType table directly in a SQL script.

That being said, I don't think this is what you want to do for your solution. You want to index user data and custom data from an API. Apparently, User indexing will be added to DNN 7.2. See the release notes for the beta.

To index data coming from an API, I think you want to create a DNN module that has an implementation of the new DotNetNuke.Entities.Modules.ModuleSearchBase where you create an override of the GetModifiedSearchDocuments method and return a list of SearchDocuments. This will give you the most control of how the data from your API gets put in the DNN lucene index. Your module doesn't have to have any view, you just need it installed in DNN and an instance placed on a page.