LiteratureInContext / LiC-app

Application development for Literature in Context. Staging on development branch (http://anthologydev.lib.virginia.edu), production on master (http://anthology.lib.virginia.edu).
Other
6 stars 1 forks source link

Search Functionality #202

Closed tonyahowe closed 4 days ago

tonyahowe commented 10 months ago

One of our Graduate Project Assistants had a good suggestion: In the main nav bar keyword search (or all full-text search), the results aren't ordered in any particular way, it seems. Could we institute a relevancy sort? Most relevant would be If the keyword appears in the TEI Header, for instance. Then the number of times a keyword appears in the body of the text (higher further up, lower down below)?

This isn't a necessary thing right now, but it's a "nice to have". :)

wsalesky commented 10 months ago

@tonyahowe we can even add weights, so some tags have more relevance than others, such as titles. Will take a look once the new version is up and running.

wsalesky commented 10 months ago

@tonyahowe Added to updated app, hope to deploy next week.

wsalesky commented 9 months ago

@tonyahowe Can you check the updated app and see if this is behaving as expected?

tonyahowe commented 8 months ago

Looks definitely like words that hit in titles are in front! It is unclear how the others are ordered, though, presumably by number of hits?

wsalesky commented 8 months ago

The variouse search fields are weighted: title : 25.5 author : 15.5 teiHeader : 5 persName : 2 placeName : 2 everything else gets a 1

These can be changed to improve the ranking if needed.

tonyahowe commented 6 days ago

Something is weird here... Searches are no longer weighted? Same thing in Chrome and Safari.

https://github.com/LiteratureInContext/LiC-app/assets/1153464/06a86993-2e9a-4ebf-b2eb-fe27ba5d4555

wsalesky commented 4 days ago

Fixed here: https://github.com/LiteratureInContext/LiC-app/pull/322