mitodl / lore

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

Search doesn't find phrases #866

Open pwilkins opened 8 years ago

pwilkins commented 8 years ago

If you enter the title of a learning resource into the search bar, you'd expect the learning resource with that title to appear near the top of the resultset. Search for "Astronauts Playing Catch", the title of a problem. It comes back on the seventh page. http://lore.odl.mit.edu/repositories/classical-mechanics/?q=Astronauts+Playing+Catch&page=7

I believe there are two issues here, one hiding the other. The first issue may be that the index doesn't contain word proximity information. The second issue, hidden by the first, is that the ranking of results doesn't properly influence the display order of learning resources.

Or it's something else entirely. :-)

@pdpinch @giocalitri

pdpinch commented 8 years ago

Does the sort order default to "Number of Views" ?

There is no view data, so is there a secondary sort order that we're using?

noisecapella commented 8 years ago

I think the secondary sort is by id, which is basically creation order

pwilkins commented 8 years ago

I found this article on the Elasticsearch blog which discusses querying on phrases: https://www.elastic.co/blog/found-text-analysis-part-1#optimizing-phrase-searches-with-shingles

The article validates what @giocalitri said in our f2f meeting the other day.

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.