Skip to content

Search the question bank with qwac's search endpoint (#57) - #58

Merged
jstet merged 1 commit into
mainfrom
issue-57-qwac-search
Sep 26, 2026
Merged

jstet merged 1 commit into
mainfrom
issue-57-qwac-search

Conversation

@jstet

@jstet jstet commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Closes #57.

searchQuestionBank sends one request to qwac's /api/search/questions, with all keywords and exclude_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.

  • Study titles for the prompt still come from the small, cached studies list.
  • A demographic hit is also dropped on the client side, in case the server filter ever misses one.
  • The tests mock both endpoints. They check the request (q, exclude_study, perPage), the mapping, items: null, and the qwac-unavailable path.
  • The README describes the new search.

Production verified (2026-09-26): qwacback.correlaid.org runs the new search. Multi-term queries match (zzzznonexistent trust returns the trust items) and exclude_study works. 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.

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
@jstet
jstet marked this pull request as ready for review September 26, 2026 16:16
@jstet
jstet merged commit 65914a7 into main Sep 26, 2026
1 check passed
@jstet
jstet deleted the issue-57-qwac-search branch September 26, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch bank search to qwac's /api/search/questions (multi-term, stemming, exclude_study)

1 participant