Bishoy Hanna
Bishoy Hanna

Reputation: 4589

which API to call in Algolia to get top records without searching keyword?

I’m using Algolia as indexing component in a project.

its acting great while searching across the index.

As for the speed purpose, i’d like to use it to get latest added records to build a home page showing a facebook like feed. (i have timestamp field in my document)

Which Api to call in Algolia for getting top records, without passing a query or a keyword?

I don’t want to pass “” empty query to the /query api as it will affect the analytics assuming its the top searched keyword.

also i noticed that /browse api uses the admin key not the public key.

Upvotes: 1

Views: 377

Answers (1)

imjared
imjared

Reputation: 20554

You can exclude a query from being registered in analytics by passing option analytics: false when you search your index.

https://www.algolia.com/doc/api-reference/api-parameters/analytics/

Upvotes: 1

Related Questions