Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all,
Vanilla are planning an update to the site on April 24th (next Wednesday). It is a major PHP8 update which is expected to boost performance across the site. The site will be down from 7pm and it is expected to take about an hour to complete. We appreciate your patience during the update.
Thanks all.

Weighted Category Seaching

  • 13-04-2014 4:26pm
    #1
    Registered Users Posts: 2,815 ✭✭✭


    Let's say I have items and categories. Each item is assigned a weight of how strongly it matches the category. Using the online dating domain as an example, an item could be a person and the categories could be "sense of humor", "kind", "genourous", "wants children", "likes to travel". The person provides a rating against each category on a scale of 1 to 5.

    When another user is seaching for prospective matches, he selects a category and the level of importance that each result should match that category. This importance is also on a scale of 1 to 5. If all categories are given a importance of 3 by the searcher, they would have equal importance. So, if the searcher given gives "sense of humor" a weighting of 5, only people whose rating is high for that category should be in the result set (and pro rata for other importance weightings). Likewise, when more categories are added to the criteria. If the user doesn't add a particular category to the search, that category is not taken into account.

    I presume this type of multiple weighted category searching is a fairly common. I would appreciate advice on how to implement it. I'm writing this in Java but I can follow most languages.

    Thanks, and please ask for clarification if anything is unclear.


Comments

  • Registered Users Posts: 5,999 ✭✭✭Talisman


    Have a look at Apache Solr it's a search engine that can be customized to meet your requirements.

    What you have described is essentially a recommendation system where you can set the preferences at run-time.
    Building a Real-Time Solr-Powered Recommendation Engine : YouTube, Slideshare


  • Registered Users Posts: 2,815 ✭✭✭SimonTemplar


    Thanks for that. I haven't heard of Solr before and I'll certainly look into it.

    However, I kinda looking for a solution based on first principles and the core maths involved rather than utilizing a full framework such as Solr, i.e. I'd rather understand the basics first rather than abstracting it with Solr.

    EDIT: This is for a college project


  • Moderators, Technology & Internet Moderators Posts: 1,333 Mod ✭✭✭✭croo


    Solr is open source, so after you look into it, you could checkout the code to see exactly how they resolved the question!


Advertisement