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

Forums / Ecommerce / Creating a product search

Creating a product search

4 posts, 0 answered
  1. Marc
    Marc avatar
    5 posts
    Registered:
    06 Dec 2011
    27 Jan 2012
    Link to this post
    Frankly I'm surprised this hasn't been posted yet but I'm trying to add search functionality to our site that looks only at products.  I created the search index (selecting products and defaulting to my search results page), dropped the search text box widget on a page and pointed it to my search results page which contains both the built in search results widget and my own custom widget.  My custom widget is what I'll ultimately be using once I verify that it returns the same results as the one out of the box which so far is true.  However, I discovered that the only field either results widget seems to use for search is the product title.  I don't understand why Telerik has made it so hard to add custom fields to the index but even the built in fields don't work?  Seems any usable search would have to include SKU and department at least.

     1) Am I doing something wrong or is this working as designed?
     2) This thread (http://www.sitefinity.com/devnet/forums/sitefinity-4-x/developing-with-sitefinity/updating-search-index-manually-search-index-fields.aspx) discusses adding custom fields to the search index.  However, I don't see where you specify which catelog will use your custom field.  If I add a custom field to one product type and I implement the code from that thread, will other searches crash because news doesn't have that field (not to mention other product types)? 
    3) Are their plans to allow you to mark a field for indexing at the time you create it in the UI?  Doesn't this seem intuitive?

    I admit to being new to Sitefinity (which I've probably made obvious by this post) so as much detail as you can give related to search and products would be helpful.  
  2. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    01 Feb 2012
    Link to this post
    Hey Marc,

    1) As far as I'm aware, this currently is as 'designed'. The ecommerce team is still building out with each release so products haven't been 'finalized' yet. In v4.3 they added multi-lingual products and the SKU. In v4.4 they added the product variations, currently flat and not hierarchical. For v5 the roadmap mentioned proper downloadable products, not sure about hierarchical attributes though. 

    But anyway I'm guessing since they're still changing the products 'base'fields, they've not dived into fully expanding the search features yet. Naturally if you add a 'static html' search, the text of customfields gets indexed, but of course that's not the nicest way of doing a search.

    2) Glanced quickly over the thread you mentioned. Haven't dabbled with custom search in v4 (yet) but if I read the code correct you should be fine and it won't crash.

    3) Yes it does seem intuitive to have that kind of control over custom fields. 

    But as I pointed out in the 1) answer, ecommerce and search is still in an early phase. To see what I mean, search for "Billing address" - it returns the checkout address page with the billing address validation labels. Search for "Shoppingcart" - it returns the actual shoppingcart information with 2 products and € 33.00 amount (see screenshot).

    ---
    Lastly (and this is purely caution) I've reported a bug with v4.4.2117 about once you created a product search, the backend products can't be reached no more so you'll want to be a bit careful and make plenty backups, or perhaps finish the rest of your project and wait 2-3 weeks till v5.0 is released and the bug will be fixed.

    Jochem

  3. Marc
    Marc avatar
    5 posts
    Registered:
    06 Dec 2011
    01 Feb 2012
    Link to this post
    Thanks for the post (and the warning), but sadly clients won't always wait for the next release.  I would still very much appreciate Telerik posting a product specific solution to adding both the built in and custom fields to the search index.  Thanks in advance.
  4. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    02 Feb 2012
    Link to this post
    @Marc,

    Trust me - in this case you'll want to wait till v5.0
4 posts, 0 answered