Copied to clipboard

Flag this post as spam?

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


  • Atoosa Khoda 96 posts 148 karma points
    Apr 18, 2012 @ 09:13
    Atoosa Khoda
    0

    advanced search on nodes relationship

    Hi, i need an advanced search based on the nodes realtionship. the senario is like this:

    i have three drop down lists, one with list of all products, for industries and for roles. These are the search criteria, user might select one or more options and the search will be an AND search. 

    Now what i would like to return as a search result is bunch of Case Studeis associated with the above three items. below is my Content structure:

    Case studies
    case study 1
    case study 2
    ...
    case study n

    Products
    product 1
    product n

    Industries
    industry 1
    industry n

    Roles
    role 1
    role n

    each individual case study is related to one or more products, and related to one or more industries and one or more roles. so there's a one to many relationship between a casestudy-products, casestudy-industry and casestudy-roles. This is implemented in the case study document type as three seperate properties, relatedProdutcs, relatedIndustries and relatedRoles. i've used uComponent multi node tree picker.

    So far I have created a user control and populated the drop down lists. now when the Search button is hit, what's the best way to query through the above strcuture and find those case studies. 

    1- shall i iterate the content tree using umbraco api and many nested loops. 

    2- get my hands dirty and use sql queries directly to the db. 

    3- there's a package or something i can customise.

     

    note: customer stories = case studies

    I'm  using umbraco 4.7.

    Appreciate your thoughts/suggestion.

    Thanks.

     

     

     

     

     

  • Carlos 338 posts 472 karma points
    Apr 19, 2012 @ 17:06
    Carlos
    0

    I am assuming all of these case options are content within Umbraco?

  • Carlos 338 posts 472 karma points
    Apr 19, 2012 @ 17:06
    Carlos
    0

    Are you using XSLT Search to do this?

  • Atoosa Khoda 96 posts 148 karma points
    Apr 20, 2012 @ 01:12
    Atoosa Khoda
    0

    that's right as explained they are nodes in my content tree within umbraco. i am not using anything yet, i was wondering if anyone could put me in the right direction. can i use the XSLT Search for this? my understanding is that XSLT Search works on text searh term within node name, propery value etc. but i'm trying to search based on ids. because i'm trying to search on relationship between the nodes. Thanks.

  • Carlos 338 posts 472 karma points
    Apr 20, 2012 @ 17:02
    Carlos
    0

    I can share with you what we are using. It is working pretty well for us.  We are using the XSLT search and using properties in our doctype to populate our search terms. We are also using jQuery to set cookies and set the Query string in the URL.  We also have custom data types for our authors to choose what pages need to go in what category so when a user submits the search it populates the area. We also edited the XSLTsearch file itself so we could add some custom fields to show up on the search results.  Works quite nicely.  Of course Umbraco 5 won't be able to use the XSLTsearch since XSLT is out of Umbraco 5 but the XSLTsearch is fast and does the job quite well. 

    I can try to put our files and try to explain a bit in another post if you would like.  Will take some time.  We would like to make a package out of it, but right now it is too custom to our needs.  But eventually.  

  • Atoosa Khoda 96 posts 148 karma points
    Apr 23, 2012 @ 08:10
    Atoosa Khoda
    0

    Hi Carlos,

     

    Thanks for sharing. Would it be possible to share the changes to the XSLT file, where the new form fields are added and the changes for making an AND search if there was any in your case. did you do a form request for the value of your drop down lists or did you do query string. will you kindly highlight those changes in the xslt for me please. I am now trying to customise the XSLTSearch to achieve what described above. Much appreciated.

Please Sign in or register to post replies

Write your reply to:

Draft