Closed hartviglarsen closed 5 years ago
I can reproduce the issue that @hartviglarsen describes. I located the problem to a predicate that determines which indexes should be affected when unpublishing a node. From my tests, it seems as if it selects the InternalIndex and MemberIndex as eligible candidates for the node removal. My interpretation of the logic is that it should rather be removing the node from the ExternalIndex.
I created a pull request #5695 that solves the issue in every situation that I have managed to set up (including the exact steps described in this issue). From what I can tell, it also solves the issue described in UmbracoDocs #1737.
However, @nul800sebastiaan seems to be able to reproduce the issue even after applying my patch (as he describes in his comment to the pull request). Perhaps someone has an idea what other logic might be in play here, because I am not able to reproduce the issue with the patch applied.
This item has been added to our backlog AB#1533
Hi, After upgrade to ver 8.1.1 the ExternalIndexer still returning unpublished content.
Netanel
Did you rebuild your index?
Hi Shannon, Yes i rebuilt my index (ExternalIndex) few times, moreover i downloaded new 8.1.1 instance just for testing that issue and its also happens there.
@ElipazSoftware which is odd since this issue wasn't present for rebuilding indexes, only for when re-indexing an individual node.
So to reproduce is just have something unpublished and rebuild your index and the item is still there? Anything else specific? does publishing and then unpublishing the node still remain? is it a variant or non variant ... basically please provide steps to reproduce.
Ill try to clirify myself, when you unpublish node at Umbraco 8.1.1 (also have been tested on brand new freshed installation with starter kit), when unpublishing node the "ExternalIndex" didnt updated, the node still appears, as if it still publish. change take affect only after rebuiling the index. the bug is "stable" non variant. when publishing again and unpublishing the node still appear. it is the same issue mentioned at the pull request https://github.com/umbraco/Umbraco-CMS/pull/5695 we querying a lot of data through Examine, so we rebuild the index for the editors daily so unpublish content will remove from the front end. Thanks
Thanks @ElipazSoftware this has just led me to realize we had not merged the related pull request in to 8.1.1! 🤦♂️
I have just done that now and this will be released in 8.1.2, coming soon. I apologize for the confusion!
While we're at it, it is almost never necessary to rebuild indexes, can you elaborate on that, why would you need to rebuild them on a daily basis? I mean, yes, I understand that this bug forced you to, but you seemed to have other reasons?
Hi Sebastiaan, thanks for that!!! the only reason we rebuilding the index on daily basis is due to this bug, no other reason. we just want to update the indexer about published and unpublished content changed by the editors that day. glad to know that ver 8.1.2 will resolve this issue. Thanks a lot guys
I encountered an issue where a content node will remain as a document in my ExternalIndex after being unpublished, which means I will get it in my ISearchResults if I query for its NodeTypeAlias. All its values will be null if I convert it to an IPublishedContent, obviously. Since it is unpublished.
Reproduction
The node will be gone as a document if you rebuild your index.. but you don't wanna do that everytime you unpublish. ;-)
This item has been added to our backlog AB#1533