Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Algolia: using index.browse() instead of index.search()? #61

Open
jereze opened this issue Nov 20, 2017 · 1 comment
Open

Algolia: using index.browse() instead of index.search()? #61

jereze opened this issue Nov 20, 2017 · 1 comment

Comments

@jereze
Copy link
Contributor

jereze commented Nov 20, 2017

res = index.search(self.config.get("searchQuery", ""), search_settings)

From Algolia documentation, index.browse() is recommended to retrieve a full index.

If you need to retrieve all the content of your index (for backup, SEO purposes or for running a script on it), we recommend leveraging browse as opposed to querying, as this method is optimized for speed.

Also, index.search() does not return the full index.

Algolia limits the maximum number of hits that can be retrieved via a query to 1000.

@cstenac
Copy link
Member

cstenac commented Dec 21, 2017

Actually on this line, we want to retrieve 0 hits, we only want the facet for partitioning.

We could use index.browse() for the main get_hits function but only if no search query is defined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants