Version: 0.0.4
agrag.ingestion.merge.MergePlan
Bases: BaseModel
Computed result of merging zero or more entities and mentions.
Attributes:
- survivor (
Entity) – The resulting Entity. Its merge_count, source_chunk_ids, and merged_from are this call's best local computation, for reporting; apply_merge writes new_source_chunk_ids and merge_count_delta atomically instead, so a concurrent writer's own contribution to the same node is never overwritten. - tombstone_ids (
list[UUID]) – Ids of entities absorbed into survivor. Also this call's new contribution to the survivor's merged_from, applied atomically. - conflicts (
list[ConflictRecord]) – Every field that had more than one candidate value. - accepted_merge_keys (
list[str]) – Every normalized merge_key this merge accepted -- from existing_entities and mentions alike, not only the survivor's own chosen name -- so a later mention of any accepted name resolves back to this entity instead of creating a duplicate. - new_source_chunk_ids (
list[UUID]) – The chunk ids this call's mentions and absorbed entities contribute, applied as an atomic union against whatever the survivor's node currently has. - merge_count_delta (
int) – The amount to atomically add to whatever merge_count the survivor's node currently has.
accepted_merge_keys
accepted_merge_keys: list[str] = []
conflicts
conflicts: list[ConflictRecord] = []
merge_count_delta
merge_count_delta: int = 0
new_source_chunk_ids
new_source_chunk_ids: list[UUID] = []
survivor
survivor: Entity
tombstone_ids
tombstone_ids: list[UUID] = []