Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How is the deletion from childnodes done? #27

Open
mcl-sz opened this issue Jan 10, 2022 · 5 comments
Open

How is the deletion from childnodes done? #27

mcl-sz opened this issue Jan 10, 2022 · 5 comments

Comments

@mcl-sz
Copy link
Contributor

mcl-sz commented Jan 10, 2022

Hi @bielu ,

This is not a problem, just a question about technical processing. How are the child nodes removed from the Elastic index when a node is deleted to the trash?

In the Examine UmbracoContentIndex.cs https://github.com/umbraco/Umbraco-CMS/blob/5123799e32c295a647d7e82dc65beafde37939b4/src/Umbraco.Examine/UmbracoContentIndex.cs#L123 there is a method PerformDeleteFromIndex that searches the underlying pages by "path" and then deletes them by nodeid. In your ElasticSearchUmbracoIndex.cs I see the same method but it doesn't seem to search for the child nodes (or I'm missing something)

How is it possible that the child nodes are still removed from the Elastic index?
Thank you very much in advance!

@bielu
Copy link
Contributor

bielu commented Jan 10, 2022

@mcl-sz I am almost sure sub nodes are removed as should, but can be sure as I didn't work on project for sometime, I will check that when I will have time. :)

@mcl-sz
Copy link
Contributor Author

mcl-sz commented Jan 10, 2022

Thanks for your reply @bielu. They are removed as should, no problem with that but my question is how you did this? The PerformDeleteFromIndex is called only with the parent nodeId but in some magical way the child nodes are removed as well, which is good. But which apart of the code takes care for deleting the childnodes from the index?

@bielu
Copy link
Contributor

bielu commented Jan 12, 2022

@mcl-sz I checked code and actually umbraco is sending ids of childrens also to examine, so I am not sure why Umbraco has that piece of code, I guess to remove ghosted childrens :)

@mcl-sz
Copy link
Contributor Author

mcl-sz commented Jan 13, 2022

Hi @bielu , I also was under the assumption that children where removed when using your solution, but when I use the Umbraco 8.17.1 with the startkit and delete the "About us" page, the child page "About this Starter Kit" is left in the index. The PerformDeleteFromIndex is only called once with, only the parent node Id. Could this have been changed in newer versions of Umbraco or Examine?

@bielu
Copy link
Contributor

bielu commented Jan 13, 2022

@mcl-sz most likely Umbraco changed something in code, as Examine is less likely to have breaking changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants