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

Forums / Developing with Sitefinity / search problems

search problems

4 posts, 0 answered
  1. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    12 Jan 2009
    Link to this post

    Ok, this is starting to get aggravating.  I'm having several problems while trying to implement search for the products module.  I used the code in the "In the meantime" blog, and search is indexing the products, more or less correctly. 

    It's been said a number of times that the search engine spiders the page just like any other search engine, but this can't be the case.  If I search for Pinot, I get results from the products database where Pinot is in the Product Name, or in a tag that has been applied, or in one of my custom metafields.  This is exactly what I want.  The second item from the search results is this:

    ... ... For more information on this wine, please contact us at info@SomeSite.com Barth Pinot Gris 2006 TRIFLB004 3.3 26.99 25.99 150 290 Pinot Gris White Alsace France 2006 ...
    /ClientSite.com/WineShop/TRIFLB004.aspx

    Ok, notice in the snippet field, the word Alsace?  That doesn't appear anywhere in the product page, yet it's in the index, and in the results.  Somehow Search found this, but looking through the index provider code in the products module (from that blog entry), I can't see how it picks that up.

    Anyway, I have two very critical issues:

    1.  How do I get access to each of these indexed metafield properties in the resultset?  I can't find information anywhere that tells me what fields are available in the search results, so I can't format the results at all.  Can you tell me what fields are available?

    2.  Even though I set the page title to be the name of the wine, with:

    // this finds the control in the single item container.
    if (itemContainer.GetType() == typeof(Telerik.Cms.Engine.WebControls.ContentView.SingleItemContainer))
    {
     this.Page.Title = contentItem.GetMetaData("Name") as string;

    it doesn't show up in the search results. I look at the page source, and the title is set.  But in the databinding for the search results, this is blank:

    <%#DataBinder.Eval(Container.DataItem, "title")%>

    How can I get access to the metafields, and why doesn't the title show up?

    Thanks,
    Mike

  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    15 Jan 2009
    Link to this post
    Hello Mike,

    Based on the previous search related issues we answered to you, I believe you have the answer to these questions. Unfortunately you cannot get access to the indexed metafields in the resultset.
    We will try to elaborate more in the other ticket you submitted about this, since it contains a bit more information.

    All the best,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    15 Jan 2009
    Link to this post
    Thanks for looking Georgi,

    I have the answer to #1, but not #2.  A response in the ticket is fine, though the ticket is more about the index corruption, or whatever it is that's happening there.  

    I would, however, still like to know if there is a reason why the page Title isn't appearing in the search results... I suspect it has to do with how the crawler is (or isn't) spidering.  My question is less critical now, though, as I found a hack to get me what I need.

    Regards,
    Mike Sharp
  4. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    20 Jan 2009
    Link to this post
    Hi Mike,

    I am really not sure why the Page Title is missing from the search results. I suppose the pages are still found if you search by page title though? If this is not the case, you may try to increase the weight of the Title field, through the fieldsInfoProvider.xml.

    Regards,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
4 posts, 0 answered