You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Node existe in all dimensions and remove works as expected
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 ?
The text was updated successfully, but these errors were encountered:
Iterate over all existing variants (only existing one), remove docs in Elastic
Iterate over ContentDimensionsPreset, then:
remove all doc from the index
check if node exist in the CR, reindex those nodes only
Needs to modularize a bit the NodeIndexer::indexNode to extract the closure to handle single variant indexing, but I think that should works.
And by the way the indexed content of a variant node, can depends on the other variants (contenu shine throw, so refreshing the index is maybe a good idea here.
dfeyer
changed the title
Removing a node from the index does not remove the variants
Removing a node from the index does not remove the variants in all case
Nov 7, 2018
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:
How to detect those two scenario ?
The text was updated successfully, but these errors were encountered: