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
Custom configuration for the scheduled posts collection that gets merged with the defaults.
93
51
94
-
Set to `true` to wait for algolia set / delete operations during the collection hooks.
95
52
96
-
## Notes
53
+
## Approach
54
+
55
+
In a nutshell, the plugin creates a `publish_date` field that it uses to determine whether a pending draft update needs to be scheduled.
97
56
98
-
> The current scope of the plugin is quite limited. PRs welcome!
57
+
### `publish_date`
99
58
100
-
### Drafts
101
-
Drafts are not indexed. If a document is unpublished, it gets removed from search results. Otherwise, draft updates to a published document have no effect.
59
+
Custom Datetime field added to documents in enabled collections.
60
+
Includes custom `Field` and `Cell` components that include schedule status in the client-side UI.
102
61
103
-
### Globals
62
+
### `scheduled_posts`
104
63
105
-
Globals are not supported for indexing.
64
+
Collection added by the plugin to store pending schedule updates. Can be customized via `scheduledPosts` option.
65
+
66
+
### Cron
67
+
68
+
A configurable timer checks for any posts to be scheduled in the upcoming interval window. For each hit, it creates a separate job that's fired at that document's `publish_date` (via [node-schedule](https://github.com/node-schedule/node-schedule)). The idea here is that you can configure your interval window to avoid super long running tasks that are more prone to flaking.
69
+
70
+
71
+
## Notes
106
72
107
-
### Algolia search config
73
+
Since the plugin uses cron under the hood, it depends on a long-running server and is incompatible with short-lived/serverless environments like ECS, or Vercel if you're using Payload 3.0 beta.
108
74
109
-
The internal Algolia client accepts [all options](https://github.com/algolia/algoliasearch-client-javascript/blob/master/packages/algoliasearch/src/types/AlgoliaSearchOptions.ts). Beyond that, the rest of the setup for a typical Algolia configuration is outside the scope of the plugin (setting search attributes and facets, etc).
75
+
I developed this plugin for a project that hasn't gone live yet. It has good test coverage but not in the wild yet -- there's your disclaimer.
0 commit comments