Open TimLanzi opened 6 hours ago
Please add a reproduction in order for us to be able to investigate.
Depending on the quality of reproduction steps, this issue may be closed if no reproduction is provided.
invalid-reproduction
label?To be able to investigate, we need access to a reproduction to identify what triggered the issue. We prefer a link to a public GitHub repository created with create-payload-app@beta -t blank
or a forked/branched version of this repository with tests added (more info in the reproduction-guide).
To make sure the issue is resolved as quickly as possible, please make sure that the reproduction is as minimal as possible. This means that you should remove unnecessary code, files, and dependencies that do not contribute to the issue. Ensure your reproduction does not depend on secrets, 3rd party registries, private dependencies, or any other data that cannot be made public. Avoid a reproduction including a whole monorepo (unless relevant to the issue). The easier it is to reproduce the issue, the quicker we can help.
Please test your reproduction against the latest version of Payload to make sure your issue has not already been fixed.
Ensure the link is pointing to a codebase that is accessible (e.g. not a private repository). "example.com", "n/a", "will add later", etc. are not acceptable links -- we need to see a public codebase. See the above section for accepted links.
Hey @TimLanzi,
I'm not able to reproduce your issue. The plugin itself hasn't changed much over the past several releases aside from some minor logging stuff. Some more details about your environment would be nice. Are you using db-sqlite by chance? Do you have a custom beforeSync
or other hooks that could be interfering? Anything come up in logs?
Try to include a minimal reproduction of the issue you're experiencing because I don't see anything out of the ordinary here.
See here: https://github.com/user-attachments/assets/3cbf09c5-9ae6-4a41-9f75-cac8f9a3f717
Hey @akhrarovsaid
I was using db-postgres in my project. Everything was directly from the website template I get from create-payload-app
. I made no changes to that code, and the search result document did not delete automatically. The website template does have a custom beforeSync
, but I have now removed that and the custom searchOverrides
so my plugin looks like this:
searchPlugin({
collections: ['posts'],
}),
The search result record still does not delete for me with this change.
To get this result:
create-payload-app
database is PostgreSQL template is Website.beforeSync
and searchOverrides
in /src/plugins/index.ts
All my environment info is above. I can confirm that with the db-mongo adapter, the delete functions as expected. All my issues have been when I use the db-postgres adpater.
@TimLanzi,
Yep, reproduced on monorepo with postgres. I also noticed that the tests in a PR I authored started to fail against relational db's like pg and thought it had something to do with the tests themselves even though the same tests were passing in 3.0.2
. This makes a lot of sense. I, however, don't actually think this is an issue with plugin-search
as it was pretty much unchanged as I mentioned. I think this has to do with a change somewhere else that was released with 3.1.0
. I may be wrong here though.
The last time plugin-search
was touched was beta.121
.
@r1tsuu You may find this interesting.
Describe the Bug
When I delete a document that is synced with the search plugin, the search result document is still available.
Link to the code that reproduces this issue
N/A
Reproduction Steps
create-payload-app
. Use website template and postgres database.Which area(s) are affected? (Select all that apply)
plugin: search
Environment Info