Drupal Job board: Faceted Search with “OR” operator, but sort results by most matching facet criterias/term count

倖福魔咒の 提交于 2019-12-13 04:28:58

问题


I'm quite stuck with searching for a solution for my problem and I hope that you can maybe help me.

In general I want to build a small job platform. It includes an "Explore"-Section, which is just like a Search-Page with Facets. The actual job-nodes can be tagged with terms of the two vocabulary "skills" and "interests". The facets on the search page allow the user to filter jobs exactly along these skills and interests. However, I want to use the "OR"-Operator for the Facets, so that the user gets a list with jobs, that nearly perfect match their skills & interest but also jobs that match only some of these terms.

So, here you can see the default listing page. On the left are the Facets for interest and type (Operator "OR"). On the right, you can see the result set with title, and the node's skills & interest terms:

See the image of the Jobsearch Default page

Now, I'm applying "Musik" and "Kultur" as interest-filters:

See the image of the Jobsearch with applied filters

As you can see in the result-set, the OR-operator delivers all the results. However, I would like to sort these results according to their "relevance" resp. according to the count of matched criterias. The 4. and 5. results match both terms, that are selected in the facet, but they should be listed in front of all other terms.

So, I hope you understand what I want to achieve. I started at first with Views to accomplish the goal, but I then switched to search_api and SOLR as I think, that this approach is more enhanceable in the future.

The second aim is, that a user can store his/her individual interests & skills (the filters mentioned before) in his user profile. Here, the user should see individual job recommendations based on his profile on his account-page.

So, any hints, tips, tricks, links are very welcome as I have no idea if I'm on the right track to solve my problem(s). :)

Robert


回答1:


Maybe this approach could be an alternative: Instead of using the tags as facets/filters, I could use them just as search input. when i'm typing my terms/tags within the search field of an apache-sold-search-page, i'm getting exactly the results sorted by their relevance:

Searching the tags instead of filtering

So, maybe I have just to do a small piece of code, that automatically creates a search query based on the clicked term/tags…



来源:https://stackoverflow.com/questions/16809995/drupal-job-board-faceted-search-with-or-operator-but-sort-results-by-most-ma

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!