We have moved to docs.pugpig.com! You can find this article here
Our search function uses Amazon CloudSearch and provides an easy way for your users to discover content. There are various aspects to consider when including search in your app which we’ll go through below.
Location
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
Results
Search results show in a list which displays:
- The article title
- The name of the collection the article has come from
- The published date of the article
Suggestions & Filters
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 filter by either Most Relevant, or Most Recent. It is also possible to filter alphabetically, but this is not included out of the box.
In addition to the above filters, we can also add filter options which would include any taxonomy that you have in the CMS, for example, sections or tab groups.
Timeframes
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.
Duplicates
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 multiple, 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.
Comments
0 comments
Please sign in to leave a comment.