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

Forums / Developing with Sitefinity / Question about Searching

Question about Searching

10 posts, 0 answered
  1. Jackson
    Jackson avatar
    51 posts
    Registered:
    23 May 2008
    02 Dec 2008
    Link to this post
    I have three different news providers.  I am wanting to be able to search all three of these with the same search box.  But I would like to have a different detail page come up for each one.  Because News needs to show up on a different page than Custom_News.  How can I specify the provider for each search index per catalogue. 
  2. Nikolai
    Nikolai avatar
    216 posts
    Registered:
    01 Jun 2017
    08 Dec 2008
    Link to this post
    Hi Chris Morrow,

    For now you can only combine your indexes into one index and use that for the SearchBox. It is not possible to separate the result with the out-of-the-box solution. We will considered to add this feature for some of our next releases.

    Best wishes,
    Nikolay
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Jackson
    Jackson avatar
    51 posts
    Registered:
    23 May 2008
    08 Dec 2008
    Link to this post
    Here is my thought.  Is there a way for me to check either the news provider or just the category on load of the detail page.

    Basically it would be like this.  I have a CustomNewsView class that extends the NewsView Class.  When the class is loaded for a detail page.  I would want a way to check the category, if the news item belonged to a certain category I would redirect the page to a different detail page.  Or possibly just load a different SingleItemTemplate onto the page.  What options do I have for something like this.  Basically I would just need to determine which method I could check the category of the news item and them load a different template.

    Thanks,
    Chris
  4. Jackson
    Jackson avatar
    51 posts
    Registered:
    23 May 2008
    08 Dec 2008
    Link to this post
    Okay, instead of a different category it would be a different provider. 
  5. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    15 Dec 2008
    Link to this post
    Hello Chris Morrow,

    Could you please elaborate if you need any further help on this issue? We are not sure what the status of the problem is.

    Thank you.

    Kind regards,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Jackson
    Jackson avatar
    51 posts
    Registered:
    23 May 2008
    15 Dec 2008
    Link to this post
    Basically I am looking for a workaround to the limitations of search.  What I would like to be able to do is have a detail page for news that can review which category a news item is in and if it belongs to a certain category such as Opinion then I could redirect it to a different detail page.

    So if there is a way where I can use my Custom NewsView Class to check the category first thing and if needed use a different detail page than the one that I set in the search index.
  7. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    19 Dec 2008
    Link to this post
    Hi Chris Morrow,

    There is a way to check the category with your custom NewsView control. Here is what I used for the test:
        public class CustomNewsView : NewsView 
        { 
            protected override void SetItemMetadata(Control itemContainer, Telerik.Cms.Engine.IContent contentItem) 
            { 
                //Take the category as string 
                string category = contentItem.GetMetaData("Category").ToString(); 
                base.SetItemMetadata(itemContainer, contentItem); 
            } 
        } 

    Best wishes,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. David
    David  avatar
    78 posts
    Registered:
    29 Dec 2008
    04 Feb 2010
    Link to this post
    Hi Georgi,

       Got a link for me on how to combine search indexes.  I just created a custom index, and notice the search box only hooks up to one index at a time, (could have miss something somewhere)..

    UPDATE: I just found what I miss in the Service sections.  thanks anyway


    Thanks,
    David
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    04 Feb 2010
    Link to this post
    Hi David ,

    You can create mixed search index and then pass it to SearchBox control. There is option to set two separate search indexes for SearchResult control, but you need to create custom control. You can take a look at How to search for mutliple search indexes?

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
  10. David
    David  avatar
    78 posts
    Registered:
    29 Dec 2008
    04 Feb 2010
    Link to this post
    Thanks for the link Ivan good info...

    David
Register for webinar
10 posts, 0 answered