Search indexing on custom modules - General Discussions - General Discussions - Progress Community
 General Discussions

Search indexing on custom modules

  • Search indexing on custom modules
  • Hello,

    We want to know is there a way to extend a custom module (like the on introduced in this webinar http://www.sitefinity.com/devnet/webinars/sitefinity-4-modules-made-simple-webinar.aspx) to implement the search indexes?
    and if not, is there a workaround to add our custom searching results of the custom module along with the searching results returned in the search results of the search widget?

    Thanks.
  • Hi Amrelsayed,

    There is a way, but it is quite complex with the current implementation. This is why we are refracting the API of the pipes for Q2 release which will allow you to create custom pipes and index data from custom modules. I wold suggest that you should wait for Q2 release and get benefit of the new implementation.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  • Hi Ivan,

    We have a new project starting next week, can't you tell us a specific date for the release of Q2 please?

    Thanks.
  • Hi Amrelsayed,

    Here is a link to our roadmap where we announced the release date range.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  • Thanks Ivan,

    We are short on time at the moment, would you provide us with a code sample for the workaround you mentioned in your reply, whether it has any limitations, and if it works properly regardless on the complexity factor.

    Thanks.
  • Hello Amrelsayed,

    I uploaded the sample here.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  • Hi Evan,

    Thanks for the prompt reply, we do have access to this sample but you mentioned in the same thread that it doesn't work.
     
    "custom PopeSettings could not be used by the default providers, so you cannot have custom pipe settings. This is something that will be fixed for Q2".

    Would you please clarify on whether the sample at least partially works, all we want to do is show the custom module data in the search results.

    Amr
  • Hi Amrelsayed,

    This pipe will not show on the settings screen, but the data from a custom module should be added. The sample is based on Products and if you use another module you need to change the sample. It should be working with SP1. I haven't tested with after that, because we started changing the API.

    All the best,
    Ivan Dimitrov
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  • Hi Ivan,

    I integrated the CustomPipe sample with the products module that comes with the SDK then I added the pipe in global.asax under the Bootstrapper_Initialized event handler:

    PipeFactory.RegisterPipeType("CustomPagePipe", typeof(ProductCatalogSample.CustomPipe.CustomInboundPipe));

     

    PipeFactory.UnregisterPipe("PagePipe");

    I am aware that the search scope won't show up when creating new indexes but I am having two main issues:
    1. The products are still not showing in the search results.
    2. Any attempt to Reindex an existing search index or create a new one results in an 'object reference not set to an instance of an object'.

    I am using SF4.1 SP2.

    Please advice.

    Thanks


  • Hi Amrelsayed,

    Currently your code removes the page pipe, but you should register the products pipe with its name. Most probably this is the reason why your product items are not indexes - the pipe is not registered through IoC
    Are there any results returned inside ReadInboundData()?
    Can you run the project in debug mode and see whether exactly object reference exception occurs?

    Greetings,
    Ivan Dimitrov
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  • Hello Ivan,

    We upgraded our website to Q2, can you please provide more details on how can we index data from custom modules?

    Thanks.
  • Bump on this...
  • Agreed with Jerami and AmrElsayed.

    The products sample which is coming with SDK does not include any examples of integration with search engine.
    I've read recent blog posts Registering custom pipes in Sitefinity and Publishing system brief walkthrough but it is still no clear for me how to integrate custom module and publishing system. It looks like the code snippets from these posts were taken from the source code of Sitefinity modules and they do not look like complete solution.

    How about writing a how to instruction or step by step article?
  • Hello Anton Mernov,


           If your content type inherits the content you could go in   Addministration -> Settings -> Publishing -> Types and add your type there. After restart you will see it when you try to create / edit Search Index or feed.

    Otherwise you have to implement a custom pipe. You can see how the TxtDocumentSearchInboundPipe in the sample project from  Publishing system brief walkthrough.  This is creating a pipe that will push the items into the search index when they are published. The only requirement is to be published by the fluent api. You have to implement PushData and ToPublishingPoint. Those methods will actually put the item into the publishing point. Note that you have to add some settings / mappings as it was explained in
    Registering custom pipes in Sitefinity

    All the best,
    Teodor
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>