How to model a solr index to rank student technical skills?

Viewed 57

I am trying to figure out how to design my SOLR index schema to index students skills and levels (beginner, intermediate, expert) and be able to search for multiple skills (without indicating level) and have SOLR return the students ranked accordingly (based on the level).

Example :

John Doe has the following skills:

  • ruby : expert
  • javascript : beginner

Mark Smith has the following skills:

  • ruby : beginner
  • javascript : intermediate

Susan Denver has the following skills:

  • ruby : intermediate
  • javascript : intermediate

Searching for "ruby" should return

  • John
  • Susan
  • Mark

Searching for "javascript" should return

  • Mark - Susan (same score)
  • John

Searching for a combination of skills even gets trickier.

The solutions I have in mind include using tags like structured like [skill]_[level] and have one field of the index contain the tags. Then convert the query keyword into all the various tags ...

Other option, is to create on dynamic field per "skill" : skill_ruby, skill_javascript and have the level as value.

But I am sure there must be a more straightforward solution has this is certainly been modelled in other scenarios (product ratings etc ..)

What is the correct index schema to index this type of data ?

0 Answers
Related