This project is read-only.

Indexing Parts

Topics: Writing modules
Dec 1, 2011 at 6:05 PM

I have some content items with custom parts I'd like to index so they can be found via searching. The problem I am having is that even though I have implemented OnIndexing logic in my handlers they don't appear to be getting indexed, my index has 1 item in it, the single page in my site. So this has me curious as to what the requirements are for a content item to be indexed? Does it require some specific part like Common? I've tried looking in the Lucene and Orchard.Search modules, but I'm not seeing where the "magic" happens. 

Dec 1, 2011 at 6:24 PM

The content type itself has to be set to indexable; are other parts on the same item being indexed?

Otherwise, can you show your indexing code?

Dec 1, 2011 at 8:27 PM

Since I posted this I have been looking through the tests to try and figure it out, and here is what I found:

.WithSetting("TypeIndexing.Included", "true")
I now have some nasty errors when I try to rebuild the index, so I think I may be on the right track :)