CDRH / chesnutt

Rails site code for the Charles W. Chesnutt Archive https://chesnuttarchive.org
0 stars 0 forks source link

Text search fixes - ranking and space between text #87

Open karindalziel opened 3 years ago

karindalziel commented 3 years ago

There are two problems with the text search:

1: spaces are not being added between text so some text is getting smashed together and won't be searchable. This is probably a problem with core datura, if so, fix in chesnutt and make datura issue.

2: when you search for, for instance, a novel, the reviews come up before the novel in ranked search results. It's easy to see why (lots of mentions of the title, little text). My proposed fix for now is to add the title multiple times at the end of the text if the item type is book (may need to find a format for short stories as well). That's kind of hacky, but a weighted field fix would likely involve changing the API.

karindalziel commented 3 years ago

example for #2: https://cdrhdev1.unl.edu/chesnutt/search?utf8=%E2%9C%93&q=The+Wife+of+His+Youth