+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Create custom search index for datadriven page

Create custom search index for datadriven page

3 posts, 1 answered
  1. Jan
    Jan avatar
    39 posts
    Registered:
    22 Jan 2010
    04 Nov 2010
    Link to this post
    I try to find info how to create a custom search index for a product page.

    I stuble upon this post, and that may put me in a general direction but not all the way.
    We have a product page (say products.aspx) that takes a querystring parameter to show a product.
    These products are all stored in an external database, so there is no product/myproduct.aspx page to find. All products is findable by parsing a menutree on the product page.

    What I want to do is to create a sitefinity search index that parses through our products (in menu) and index them. I'm able to retrieve a list of all products Id so I don't need to parse the menu if there is another option; for example retrieve all products and then generate the product page again and again.

    The reason I want a sitefinity index for this is that I would like to display results from both standard page index and the product index.

    Is there a way to do this?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    04 Nov 2010
    Link to this post
    Hi Jan,

    The content index gets only urls of the content items added to the data source. The index cannot get the dynamic data and cover all possible combination for a given QueryString which is dynamically created. You need to create a custom index where you pass the dynamic data ( the ID of your item) . You have to index the dynamic data and not the content item itself. Our API does not provide such methods and you cannot inherit from ContentIndexProvider class, because this will not help. You have to use the Lucene API and query your content. This situation is similar for our content index providers - each content is open in a different page, but we query the content, not the page and then form the url depending on a given property of IContent object.

    You could create a custom class that inherits from IIndexerInfo and there is a property of type Guid which you can use to return an item ID. The IndexerInfo implements GetData() method which you can use to retrieve your specific data.  Then in your custom provider you can return all objects from IIndexerInfo and form the url you want to point to each item.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  3. Jan
    Jan avatar
    39 posts
    Registered:
    22 Jan 2010
    04 Nov 2010
    Link to this post
    Thanks for an very quick response.

    Found this when searching for what you suggested and I guess thats the ground work, just have to remove your forum API calls and use my own datareaders.
Register for webinar
3 posts, 1 answered