mitodl / lore

Learning Object Repository for Education
https://goo.gl/nDVx4D
GNU Affero General Public License v3.0
16 stars 6 forks source link

Added sorting by relevance (_score) #872

Closed giocalitri closed 8 years ago

giocalitri commented 8 years ago

Fixes #868

pwilkins commented 8 years ago

As @giocalitri warned, this may get complicated.

Setting the default sort order to "relevance" moves the learning resource titled "Astronauts playing catch" to the top of the result list, but adding "Astronauts playing catch" to the description of another LR bumps the titled LR to second spot.

screen shot 2016-01-22 at 2 04 01 pm

Since I'm doing this locally, the fact that there are no LR descriptions (other than the one I added) may have unbalanced its relevance.

giocalitri commented 8 years ago

@pwilkins was the search string "Astronauts playing catch" ? Can you check the score of the two learning resources: it is in the JSON returned by search API

noisecapella commented 8 years ago

Code looks good, testing functionality now

noisecapella commented 8 years ago

I was just wondering, shouldn't it be descending relevance since the most relevant item should be first?

giocalitri commented 8 years ago

it actually is: I will remove the string (just relevance)

noisecapella commented 8 years ago

Sounds good, feel free to merge after :+1:

giocalitri commented 8 years ago

@noisecapella done: will merge after tests pass again

giocalitri commented 8 years ago

Travis finally worked: merging