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

Forums / Developing with Sitefinity / Add more Metafield in SearchResult

Add more Metafield in SearchResult

6 posts, 0 answered
  1. Tarun
    Tarun avatar
    81 posts
    Registered:
    14 Jan 2009
    29 Dec 2010
    Link to this post
    Hi,

    Is this possible to add some more metafield as "Creator","DateCreaterd"  field in searchresult control and how can I wrap "search result" and "search box" controls in custom module.

    Thanks,
    Tarun
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    29 Dec 2010
    Link to this post
    Hello Tarun,

    1. You can get specif data for the IContent item by adding its ID to the Lucene segment files. You will find more information at this post where I  provided some samples.

    2. Wrapping the controls - you can declare them in some custom templates or create the controls dynamically. Both the control are part of Telerik.Search.WebControls namespace.

    Kind 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
  3. Tarun
    Tarun avatar
    81 posts
    Registered:
    14 Jan 2009
    30 Dec 2010
    Link to this post
    Thanks Ivan for your reply!

    It looks like I have to create custom search control for this.

    Let me explain my full requirement here. I am trying to search contents based on its module/provider. I have some custom module and want to add specific metafield search for them. So, is it possible to create some customindex based on its module provider like we have for news. A search provider to search a specific module/provider can be built?

    Regards,
    Tarun
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    30 Dec 2010
    Link to this post
    Hello Tarun,

    Please take a look at Implementing custom search index provider.

    Best wishes,
    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
  5. Tarun
    Tarun avatar
    81 posts
    Registered:
    14 Jan 2009
    04 Jan 2011
    Link to this post
    Thank you Ivan!

    I added that search index in my module and seems to work fine. Now  I want to add some more metafield in search result so I tried to get its content id but few item from them not return guid,

    Please take a look on attachment for better understanding.

    Regards,
    Tarun
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    05 Jan 2011
    Link to this post
    Hi Tarun,

    The item ID is returned only when you search for a therm that is found in the Content of IContent object. When you search for a therm that is a metakey like "Title" the Guid is not added to the snippet and in this case you can resolve the item by its Title( for instance /10-10-28/news1.aspx). You can validate first 36 symbols returned by the snippet and it this is not a guild you could get the ResultItem Url or property.

    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
Register for webinar
6 posts, 0 answered