The Search component allows users to search available content. As users type, a list of suggestions appears, from which users can either select a suggestion or search using their entered term. By default, results are categorized into Stories and Clips. A tenant can also be configured with client-supplied Articles, displayed in a horizontal carousel. Storyteller controls which result sections are visible and their order, title, layout, and result limit; no additional app integration is required. Filters allow users to narrow down their results by date posted or content type, or sort them by selected criteria.
The Search feature can be enabled through CMS by setting the enableSearch value to true. Once enabled, Search is available in both Clip and Story players without any additional changes required from the integrating app. Storyteller supplies the configured result sections, including any client-supplied Articles source. The Android SDK limits an Articles carousel to the first 20 results returned for a search; result inclusion and ordering within that response are controlled by the configured service.
Additional Search functionality is available through the Storyteller class:
isSearchEnabled - returns whether search functionality is enabled at the app level.
openSearch - opens the Searchcomponent from anywhere in the app. If Storyteller player is currently displayed, it will be dismissed before presenting the Search component.
The full Search surface can be customized independently for light and dark appearances, including the screen background, input, filter button, suggestions, no-results state, Filters sheet, and Apply button. Search copy inherits the global theme font, and result headings continue to use theme.lists.title. When Apply-button colours are omitted, light appearance uses a dark button with light text and dark appearance uses a light button with dark text. When Search is opened from a Story or Clip player, it inherits that player's active theme and UI style; Storyteller.openSearch() continues to use the global theme. For the complete field list, defaults, and fallback rules, see Themes.
{"slug": "search", "page_title": "Search", "page_url": "Search/", "canonical_url": "/android/Search/", "markdown": "# Search\n\nThe `Search` component allows users to search available content. As users type, a list of suggestions appears, from which users can either select a suggestion or search using their entered term. By default, results are categorized into `Stories` and `Clips`. A tenant can also be configured with client-supplied `Articles`, displayed in a horizontal carousel. Storyteller controls which result sections are visible and their order, title, layout, and result limit; no additional app integration is required. Filters allow users to narrow down their results by date posted or content type, or sort them by selected criteria.\n\n## Showcase examples\n\n- [Compose \u2014 opening Search (`MainScreen`)](https://github.com/getstoryteller/storyteller-showcase-android/blob/main/compose/app/src/main/java/com/getstoryteller/storytellershowcaseapp/ui/features/main/MainScreen.kt#L75)\n\n## Search Filters\n\n`Date Posted` possible values:\n\n- `All` - default value\n- `Past 24 hours`\n- `Last Week`\n- `Last Month`\n- `Last Year`\n\n`Content Type` possible values:\n\n- `All` - default value\n- `Stories`\n- `Clips`\n- `Articles` - shown only when an Articles result section is configured for the tenant\n\n`Sort By` values:\n\n- `Relevance` - default value\n- `Like Count`\n- `Share Count`\n- `Date Posted`\n\n## How to Use\n\nThe `Search` feature can be enabled through CMS by setting the `enableSearch` value to `true`. Once enabled, Search is available in both Clip and Story players without any additional changes required from the integrating app. Storyteller supplies the configured result sections, including any client-supplied Articles source. The Android SDK limits an Articles carousel to the first 20 results returned for a search; result inclusion and ordering within that response are controlled by the configured service.\n\nAdditional `Search` functionality is available through the `Storyteller` class:\n\n- `isSearchEnabled` - returns whether search functionality is enabled at the app level.\n- `openSearch` - opens the `Search`component from anywhere in the app. If Storyteller player is currently displayed, it will be dismissed before presenting the `Search` component.\n\n## Customization\n\nThe full Search surface can be customized independently for light and dark appearances, including the screen background, input, filter button, suggestions, no-results state, Filters sheet, and Apply button. Search copy inherits the global theme font, and result headings continue to use `theme.lists.title`. When Apply-button colours are omitted, light appearance uses a dark button with light text and dark appearance uses a light button with dark text. When Search is opened from a Story or Clip player, it inherits that player's active theme and UI style; `Storyteller.openSearch()` continues to use the global theme. For the complete field list, defaults, and fallback rules, see [Themes](Themes.md#search).\n", "copy_markdown_include_header": false, "base_path": "android", "ai_dir": "ai", "missing_payload_behavior": "empty"}