Hi Fabrizio,
Fabrizio Giustina wrote:
No, the reason why I didn't submit any issue to jira is because I
wasn't able to reproduce the error that caused the inconsistency...
removing nodes usually removes them from the search index correctly, I
was not able to recreate that situation in a junit test.
After a few day's tests I ended up in removing the index directory to
make lucene reindex the whole repository and now it's fine (the index
has never been corrupted anymore).
I was thinking about adding an hook in the search result iterator in
order to remove invalid nodes on the fly (a rude implementation: catch
the NoSuchElement exception and remove it from the index): maybe this
could be a fail safe solution in order to avoid ghost nodes in the
search index?
yeah, I was also thinking about such a solution, but this would surely
be just a workaround for this kind of situation. I'll probably implement
a more failsafe iterator which will log as much information as possible
about the node when this error occurs. this would then help to find out
what acutally happens.
thanks a lot for your feedback.
hmm, just thought about the node type discussions we had on this list...
This might be a source where the nodes in the workspace are not in
sync anymore with the index. If one modifies the custom_nodetypes.xml
directly on the filesystem then this change will not be reflected in the
search index.
regards
marcel