Support for specifying custom keys to use for document _id
4d11 opened this issue · 2 comments
PGSync version: 2.5.0
Postgres version: 15
Elasticsearch version: 7.8.0
Redis version: ..
Python version: 3.9.6
Problem Description:
Is it feasible to add support for using custom _id
s instead of using the table's specified ones. I have a use case where the table's primary keys are (item_id, item_version). I would like to only have the latest version of the record indexed in Elasticsearch while keeping older versions as a record in postgres. Specifying the _id
as (item_id) would achieve this behaviour.
I will happy to pick up this task if there is no existing method
Error Message (if any):
Did you solve this issue? I too need the ability to generate a custom _id
but don't want to duplicate your work if you've already done it.