Create A Search Index for a Document Library

Posted by Community Admin on 03-Aug-2018 23:52

Create A Search Index for a Document Library

All Replies

Posted by Community Admin on 29-Oct-2015 00:00

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.

Posted by Community Admin on 03-Nov-2015 00:00

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

 
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
 

Posted by Community Admin on 27-Jan-2017 00:00

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.

Posted by Community Admin on 16-Jan-2018 00:00

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.

Posted by Community Admin on 16-Jan-2018 00:00

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

 

This thread is closed