toluaina / pgsync

Postgres to Elasticsearch/OpenSearch sync
https://pgsync.com
MIT License
1.11k stars 174 forks source link

#remove unused searching for doc_id #374

Open pigTom opened 1 year ago

pigTom commented 1 year ago

Execuse me, I found the code snipped is unuseful and it will cause problem, child id type is diffirent from parent node id. we using fields which is child value to search parent table, the logic is wrong.

 for doc_id in self.es._search(
                        self.index,
                        node.parent.table,
                        fields,
                    ):

fix https://github.com/toluaina/pgsync/issues/352

toluaina commented 1 year ago

Execuse me, I found the code snipped is unuseful and it will cause problem, child id type is diffirent from parent node id. we using fields which is child value to search parent table, the logic is wrong.

 for doc_id in self.es._search(
                        self.index,
                        node.parent.table,
                        fields,
                    ):

fix #352

I think removing this will lead to other problems. I have somewhat addressed this in this commit . So this should be fixed in the main branch

toluaina commented 1 year ago

Can you please confirm if this is resolved now please. I strongly feel this has been fixed in the master. Apologies for the delay