wellcomecollection / wellcomecollection.org

🪟 Wellcome Collection's website and services that support it
https://wellcomecollection.org
MIT License
39 stars 5 forks source link

Improve handling of high-frequency query terms in the image view #10477

Open paul-butcher opened 11 months ago

paul-butcher commented 11 months ago

When visiting an item consisting of multiple images, e.g. a book: https://wellcomecollection.org/works/afbv9sqw/items

You can supply a query in order to find instances of that term in it. e.g. https://wellcomecollection.org/works/afbv9sqw/items?query=force

When the frequency of this term is reasonable, then the response is returned promptly. However, given a very high frequency term (such as a common stop word) takes a long time to return, and may time out. In afbv9sqw, there are 453 instances of the word force (this is fine) and 4231 instances of the word the (this is bad)

pollecuttn commented 11 months ago

More at https://wellcome.slack.com/archives/C3TQSF63C/p1701685507121779