Bolt In-App Search Experience
There are various aspects to consider when including search in your app and this article explains the options available to you.
Search can be included in your app in a few places
- As its own tab along the bottom
- Within your settings/account tab
- As an icon at the top right of the app toolbar
The Search card
It is also possible to not dedicate a full tab to search - instead there is an option to place a search card within a timeline, which links to the usual search experience page.
Search results show in a list which displays:
- The article title
- The name of the collection the article has come from
- A summary of the article - the standfirst if available, or part of the first paragraph
Suggestions, filtering and sorting
To get started users can begin typing in the search bar, which will automatically suggest similar terms. These can be tapped on to search for a specific article, or users can type their own term/phrase and press search. Once results have loaded, users will then have the option to sort by either Most Relevant, or Most Recent. It is also possible to sort alphabetically, but this is not included out of the box.
In addition to the above sorting options, we can also add sorting options which would include any taxonomy that you have in the CMS, for example, sections or tab groups.
By default search will index and return all content that is currently in the app and has previously been in the app. However this can be adjusted to only return results for content that is currently in the app. There is also a setting which allows you to only return results after a specific date.
If a piece of content is in multiple collections, you can choose if only a single result should be returned for the search, or one per collection. The default is to show one, but each will show the different collection title on the result.
Protecting Access to content
In some cases, you may only want search to be available to certain users, based on their access level. We can configure search to only allow access if users are signed in or subscribed. If they are not then when they navigate to the search screen they will see a message informing them that search is only available to signed in users.
This can be controlled separately, per authentication type, meaning we can have separate rules for 3rd party authenticated users, store subscribes users, or users logging in with voucher codes.
Can anyone use search or is it for logged in users only?
By default everyone has access, but it is configurable and we can adjust search on your app to require a login token that users will automatically have if they are signed in or subscribed.
If an article is in multiple timelines, how will it appear in search?
By default if an article is in multiple timelines it will only appear once in search. The result will be from the first time the article is processed in distribution. If desired, we can adjust the behaviour for an article to appear as many times as it appears in timelines.
If an article is no longer in the app, will it still be searchable?
Yes by default articles will remain in the search index indefinitely when they're no longer in the app timelines. If you'd like them to leave the search index when they leave the app let us know.