Skip to content

Removing a node from the index does not remove the variants in all case #285

@dfeyer

Description

@dfeyer

Given I have a node in dimension A, on a website with 2 dimanesions A and B and my node does not exist in dimension B

During indexing we create two document in the index one for dimension A and one for dimension B.

If I remove the node in dimension A, the document in this dimension is removed correctly but the one in the dimension B. It's not a big issue, because the document of the Elastic query are filtered and only existing document in the CR are returned.

But it's not clean ;) and in some case it can have an impact on the query algorythm, because Elastic use data that are not in sync with the CR.

Affected version: all

Possible solution

It's a bit complexe, in my case it's easy, we can remove all variants (because node does not exist in dimension B).

But it's a valid case, to have the node in both A and B dimensions, but only removing the one in dimension A (in this case the current behaviour is correct.

So we have two scenario:

  1. Node existe in all dimensions and remove works as expected
  2. Node exists only in a subset off all dimensions in this case the content of the index is out of sync as soon as we delete the node in one or some dimensions (but not all)

How to detect those two scenario ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions