Search the question bank with qwac's search endpoint (#57) - #58
Merged
Merged
Conversation
qwac's /api/search/questions now does what formulaid's own search did (CorrelAid/qwacback#17): several terms OR-matched and ranked by how many match, umlauts folded, German and English stemming, compounds, and exclude_study. searchQuestionBank sends one request with all keywords and exclude_study=<demographic standards>, perPage=30, instead of downloading every question and stemming in the browser. Study titles still come from the small, cached studies list. A demographic hit is dropped client-side too. Needs the redeployed qwacback in production: the old search matches the whole query as one substring and would return almost nothing. Closes #57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #57.
searchQuestionBanksends one request to qwac's/api/search/questions, with all keywords andexclude_study=2z4e5jfgc6s6mwy&perPage=30. It no longer downloads every question and stems them in the browser, because qwac's search now does that (CorrelAid/qwacback#17): several terms, umlauts, German and English stemming, compounds and study filters.q,exclude_study,perPage), the mapping,items: null, and the qwac-unavailable path.Production verified (2026-09-26): qwacback.correlaid.org runs the new search. Multi-term queries match (
zzzznonexistent trustreturns the trust items) andexclude_studyworks. Real runs on this branch: the education case takes the NPS item from the bank, and the neighbourhood case gets both trust items, empowerment and facility usage as hits.