fix: no infinite soup search for query misses #605
Merged
+48
−34
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.
Summary
before, a search miss would cause us to keep hitting the soup endpoint for every single dss item, including emails, which ends up being dozens/hundreds of soup calls...every time.
searching on soup + using search service requires some careful consideration. notably, we want to able to fuzzy over what we have locally. we also want to be able to fetch more data from soup to get more search results. however, there's a cost to doing this with emails since there are so many. what this pr does:
i think what we'll eventually want to do though, is separate a cached data source from our fetch more. since the search source should be relatively stable, we don't fetch more to keep getting more backend data every time when we already have a cached search source. having the search data fetch very tightly linked to the request body/search term state and response outcomes makes it difficult to reason about/keep the list stable
Screenshots, GIFs, and Videos
this is what we had in DEV
CleanShot.2025-12-12.at.16.34.36.mp4
CleanShot.2025-12-12.at.16.09.07.mp4