DELETEs aren’t supported by ZDB. The Postgres Acess Method API doesn’t route DELETEs through the API, so ZDB doesn’t get notification of them. You can run a plain VACUUM on the table to force the deleted rows to be removed from the backing ES index, or wait for autovacuum to do it.
Note that querying ZDB through Postgres with a SELECT * FROM table WHERE zdb(‘table’, ctid) ==> ‘full text query’-style query will never return deleted rows, so generally this isn’t a problem.
If you’re querying ES directly through its REST API, that’s not a supported use-case for ZDB, so that is kinda a buyer-beware situation.
That said, I created an issue the other day (https://github.com/zombodb/zombodb/issues/208) that talks about a crashing problem ZDB has with the most-recent PG point releases. In order to fix that (it’s related to VACUUM), I’m going to need to add support for tracking DELETEd tuples, but the implementation detail there will be adding additional docs to a new type in the ES index, not actually deleting the docs.
All the more reason why you should be querying ZDB via PG, not directly querying its ES indexes via ES’ REST API.
eric
Sent from Mail for Windows 10
--
You received this message because you are subscribed to the Google Groups "ZomboDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zombodb+u...@googlegroups.com.
To post to this group, send email to zom...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zombodb/f322f87e-7ef9-4e09-ab8d-cfae56191393%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to zombodb+unsubscribe@googlegroups.com.
To post to this group, send email to zom...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zombodb/f322f87e-7ef9-4e09-ab8d-cfae56191393%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Xavier!
Running a plain VACUUM (as in, simply “VACUUM tablename;”) does *NOT* rebuild indexes. A “VACUUM FULL tablename;” would, however.
Also, you might should spend some time with ZDB’s “SYNTAX.md” documentation, to help you with formulating queries. Note that it even lets you use ES QueryDSL directly: https://github.com/zombodb/zombodb/blob/master/SYNTAX.md#elasticsearch-json-queries
Bypassing PG and talking to ES directly really isn’t a supported situation.
To unsubscribe from this group and stop receiving emails from it, send an email to zombodb+u...@googlegroups.com.
To post to this group, send email to zom...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zombodb/f322f87e-7ef9-4e09-ab8d-cfae56191393%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Xavier Tello
Desk 9B110-H
To unsubscribe from this group and stop receiving emails from it, send an email to zombodb+unsubscribe@googlegroups.com.
To post to this group, send email to zom...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zombodb/f322f87e-7ef9-4e09-ab8d-cfae56191393%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Xavier Tello
Desk 9B110-H