Copied to clipboard

Flag this post as spam?

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


  • Darren 14 posts 34 karma points
    Mar 14, 2013 @ 19:36
    Darren
    0

    using examine to search on specific fields

    Hi

    I have a site where users can upload adverts and each advert has a "title" and "category" field.

    the adverts are created as a specific document type under a node/folder called "users adverts".

    I want the users to be able to search adverts.

    When a user searches, the search should look at the "title" and "category" field of each "advert" and return it if it matches the search criteria.

    any ideas on how best to do this with "examine" and is examine the best thing to use?

    thanks

  • Tim 1193 posts 2655 karma points c-trib
    Mar 18, 2013 @ 11:44
    Tim
    0

    This would be very easy to do in Examine, and if there are going to be a lot od adverts, then examine is probably the best thing to use. If there aren't going to be a huge amount of adverts, you could also look at the XSLT Search package which is slightly easier to use and set up if you aren't comfortable writing .Net code.

    For the Examine search, you'd need to set up the indexer and searcher, and tell it to only index the adverts document types, and then write some searh code, either as a .Net user control, or a Razor macro.

    For some example code on how to use Examine, check out this blog post: http://umbraco.com/follow-us/blog-archive/2011/9/16/examining-examine.aspx

    Hope that helps!

    :)

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies