- ID
- ef6085b9-d0d1-479b-ac16-804a08c21d65
BE-7010 Add search support to V2 Product endpoint
- source :: https://hungryroot.atlassian.net/browse/BE-7010
- tags :: Hungryroot API Project
- epic :: EP-411 Eng Parking Lot
- sprint :: HR BE Sprint 102
- status :: Status - Complete
Tasks
DONE Add search_text to search_fields on the ProductList view
- ID
- 0188db3f-6a7a-0d9f-c920-49964f8b2fb5
DONE QA that this works properly
- ID
- c29e46ab-d364-41ff-bf2b-6696b1d9ea78
- Note taken on
Background
The v2 Product list endpoint currently exposes a search query parameter in
Swagger (“A search term.”), but the backend search functionality is not actually
wired up. The view is using DRF’s built-in SearchFilter, however search_fields
is not defined on the ProductList view, so no filtering is applied. This ticket
should add the appropriate search_fields configuration so that search behaves as
expected. The implementation should mirror v1 pairing search behavior, filtering
products using a case-insensitive match on search_text (e.g., products =
products.filter(search_text__icontains=term)). Once implemented, verify that the
search parameter in Swagger correctly filters results and add a small test to
prevent regressions.