You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 13, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 13, 2023. It is now read-only.
Hi there! I'm very confused, what is the purpose of this plugin?
Is it purely for searching in the admin ui?
is it also for creating a searchbar on the frontend?
Also, by default only the 'title' field is added, how would we set customs fields? The docs do not explain this.
And lastly, the search results collection on only populated when a doc is created or edited. Would this mean that if one were to add this plugin after there are already 200 docs created, those are not searchable untill they are edited?
Thanks in advance!
Reacted by Dylan Kuipers, Tim Lanzi, Thomas Bergheim, Timothy Choi, Berker Demirer and Prakash Acharya
Hey @silveltman it looks like you've got a lot of support here 😄 Think of this plugin almost like an "Algolia Lite" so-to-speak in that you save static, minimal data for each document that can be used to serve up super fast responses in something like a search bar on your front-end. The results that are displayed in a search bar typically only need something like a title field, some metadata, the slug, etc. But this strategy also bypasses all of your potential afterRead hooks that may be present on your collection. So you can query these instead of your full documents, which may be a much more expensive operation to run based on your config. These records are also indexed in the db for further optimizations in the query itself.
We'll definitely be improving the docs around this plugin, as well as all the others. RE: populating existing docs into the search, we ca write a utility function directly into this plugin that does this automatically when you click a button in the admin dashboard or something. That is a very good idea and easily doable.
This plugin is now being maintained in the Packages Directory of the Payload Monorepo. This repo will soon be archived and all open issues including this one will be closed. This issue has already been added to this open discussion, though, so that it will not get lost. Please refer to that discussion for more details and to continue the conversation.
Activity
jacobsfletch commentedon Dec 13, 2023
Hey @silveltman it looks like you've got a lot of support here 😄 Think of this plugin almost like an "Algolia Lite" so-to-speak in that you save static, minimal data for each document that can be used to serve up super fast responses in something like a search bar on your front-end. The results that are displayed in a search bar typically only need something like a title field, some metadata, the slug, etc. But this strategy also bypasses all of your potential
afterReadhooks that may be present on your collection. So you can query these instead of your full documents, which may be a much more expensive operation to run based on your config. These records are also indexed in the db for further optimizations in the query itself.We'll definitely be improving the docs around this plugin, as well as all the others. RE: populating existing docs into the search, we ca write a utility function directly into this plugin that does this automatically when you click a button in the admin dashboard or something. That is a very good idea and easily doable.
jacobsfletch commentedon Dec 13, 2023
This plugin is now being maintained in the Packages Directory of the Payload Monorepo. This repo will soon be archived and all open issues including this one will be closed. This issue has already been added to this open discussion, though, so that it will not get lost. Please refer to that discussion for more details and to continue the conversation.