DiscoveryService combines two complementary discovery surfaces:
- Search — full-text query across the catalog.
- Browse — curated editorial entry points (featured, new releases, charts, genres).
Search
Results are returned as a list of
Content wrappers — branch on the oneof id arm to act on each match.
Browse
Editorial output varies by market — pass
market where the RPC accepts it.
When to use which
- Specific known query?
Search. The user typed it. - Discovery / open-ended UX?
BrowseFeaturedfor the home screen,BrowseChartsfor “what’s hot”,BrowseGenres→GetGenreContentfor filter-driven browsing. - “What’s new?” UX?
BrowseNewReleases.
Performance tips
- Large
page_size(up to 100) reduces round-trips for paginated browse output. - Search ranking is not stable across queries — don’t paginate deep beyond what your UI actually shows.
- Charts are recomputed periodically; treat chart entries as a snapshot rather than real-time.