Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Robert Mulder 79 posts 272 karma points c-trib
    Dec 12, 2014 @ 12:32
    Robert Mulder
    0

    Searching products

    What is the best way to search products including custom fields?

    For instance, I have a product definition with a custom field and the default long description. Now I want to enable visitors to search products in my store using plain old keywords in a search bar and include the text in the long description and my custom field.

    I could 'simply' use the Product entity to search, but I get a feeling that that's not very performant. In addition, I know that RavenDB has 'near match' functionality that I would like to use. (for instance searching for 'snwoman' would also match 'snowman' with a lower certainty)

    I assume it would involve creating a custom indexer or whatnow, but I haven't been able to find any documentation on how to this.

    I've read the content of this post:

    http://docs.ucommerce.net/ucommerce/v6/getting-started/search-foundation/search-library.html

    But it speaks only of searching using Facets.

    I'm assuming someone out there must've done something similar to this so any any help on the subject would be greatly appreciated.

  • Martin 181 posts 740 karma points
    Dec 13, 2014 @ 14:20
    Martin
    0

    Hi Robert,

    So what I hear you're saying is that you would like to implement a freetext search? That "can" be tricky depending on what you're aiming for. First of all you're going to create your own search logic directly and how it should interprept your search term.

    First of all I would recommend reading this: http://ravendb.net/docs/article-page/2.5/csharp/client-api/querying/static-indexes/searching

    There are different ways you can go to make your search but I am certain that you have to use uCommerce's Product document. I'm not sure if uCommerce already have some statuc indexes in Ravendb but that should be fairly easy to figure out.

    Best regards

    Martin

  • marcelh 171 posts 471 karma points
    Apr 01, 2015 @ 09:46
    marcelh
    0

    Hi Robert, how did you get along with searching products? What approach did you take? I have the same requirements here and stumbled upon this post, but it's from a while ago http://www.diplo.co.uk/blog/2013/1/23/indexing-ucommerce-products-in-umbraco-using-lucenenet.aspx

  • Robert Mulder 79 posts 272 karma points c-trib
    Apr 01, 2015 @ 10:26
    Robert Mulder
    0

    I ended up creating a custom Lucene index using the ISimpleDataService interface. Works pretty well (though I'm still not exactly sure how Lucene weighs the search results)

  • marcelh 171 posts 471 karma points
    Apr 01, 2015 @ 11:40
    marcelh
    0

    Ah oke, nice. So you also took the Lucene approach. Would you mind sharing (parts of) your code?

  • Søren Spelling Lund 1797 posts 2786 karma points
    Apr 14, 2015 @ 13:21
    Søren Spelling Lund
    0

    Thank you for sharing what you did. Could you mark the topic as solved please?

Please Sign in or register to post replies

Write your reply to:

Draft