From 129350d6fccfff47027042b318401733a7dcfc59 Mon Sep 17 00:00:00 2001 From: Sylvain Pace Date: Wed, 22 Aug 2018 17:01:54 +0200 Subject: [PATCH] adding hitsperpage --- docs/src/behavior.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/src/behavior.md b/docs/src/behavior.md index 5b3973cf..c249c927 100644 --- a/docs/src/behavior.md +++ b/docs/src/behavior.md @@ -100,14 +100,20 @@ search.autocomplete.on('autocomplete:opened', event => { You can pass options to the Algolia API by using the `algoliaOptions` key. You will find all Algolia API options in their [own documentation][3]. +For example, you might want to increase the number of results displayed in the dropdown. +[`hitsPerPage `set the number of shown hits][4]. + ```javascript docsearch({ algoliaOptions: { + hitsPerPage: 10, // See https://www.algolia.com/doc/api-reference/api-parameters/ } }); ``` + [1]: https://github.com/algolia/autocomplete.js [2]: https://github.com/algolia/autocomplete.js#options [3]: https://www.algolia.com/doc/api-reference/api-parameters/ +[4]: https://www.algolia.com/doc/api-reference/api-parameters/hitsPerPage/