Algolia driver: How to hide unpublished pages from search results #5200
-
Hey, I'm using Algolia as my search driver and Algolia returns "unpublished" pages in my search results (leads to 404s). Does anybody know how to prevent that? I only want to show "published" entries in the results. Can I control on the statamic side which entries gets indexed (based on the status)? Or do I have to filter out "unpublished" entries on the algolia side? If so, does anybody know how to do this? Thanks in advance... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I add the |
Beta Was this translation helpful? Give feedback.
I add the
published
field to the search index, and configure Algolia to have aAND published:true
as a default filter using the https://www.algolia.com/doc/api-reference/widgets/configure/js/ widget