Create A Search Index for a Document Library
I see where I can create a search index to search my "documents" But how can I have it index only one of my libraries within my documents?
I have several libraries filled with PDFs under the Documents & Files file type. I want to create a search index of only one library, not ALL my documents.
Hello,
The search index do not have the granularity to specify a particular library. That said, you can create a custom search results widget to filter the desired results. See http://www.sitefinity.com/blogs/laurent-poulain's-blog/2015/10/12/troubleshooting-lucene-search-issues (Customized Search) for further details.
Regards,
Laurent Poulain
Telerik
My way didn't include overriding any widget, you can create search indexes for each doc lib you are willing to index (unique names for indexes). then override the DocumentInboundPipe and in the CanProcessItem method check what's the publish point name (this.PipeSettings.PublishingPoint.Name) and if it's equal to your search index name then only allow the documents that belong to the library you want to index.
Let me know ifthat makes sense.
I know this is an old post but could you show and example of how to do this? I'm trying to do the exact same thing.
See DocumentInboundPipeCustom screenshot for how you override the DocumentInboundPipe (sorry wasn't able to attach a cs / txt file)
Then make sure you unregister/register documentinboundpipe and the custom one you created in global.asax --> Application_Start as following:
if (eventArgs.CommandName == "Bootstrapped")
Custom.DocumentInboundPipeCustom.AddCustomPipe();
You might need to change namespaces and such depending on the structure where you put your file but hopefully that helps.
Thanks,
-Madona