cancel
Showing results for 
Search instead for 
Did you mean: 

BUG? Disappearing Lucene index entries

dbevacqua
Champ in-the-making
Champ in-the-making
Hi

I create a number of nodes of custom type cms:contact in one place in a repo, under an instance of a subtype of sys:container.

I then create a number of nodes of custom type cmsSmiley Surprisedrganisation (itself a subtype of sys:container) in another place in a repo. I create child associations between these nodes and some of the others, so I end up with something like:

cms:contacts
- cms:contact1
- cms:contact2
- cms:contact3

cmsSmiley Surprisedrganisations
- cmsSmiley Surprisedrganisation1
   - cms:contact1
- cmsSmiley Surprisedrganisation2
   - cms:contact2
- cmsSmiley Surprisedrganisation3
   - cms:contact3

Both Lucene search and JCR API confirm this structure. the NodeService confirms that the primary association of the cms:contacts is to cms:contacts, and their other associations are secondary. All is well.

Using NodeService.deleteNode() I then delete cmsSmiley Surprisedrganisations. The JCR api still says the contacts are there under cms:contacts, but Lucene says there is nothing there. If I get the node cms:contacts it still has 5 child associations according to the NodeService, and they are all primary.

So the entries appear to have been removed from the Lucene index.

What to do? Please help!

Dominic
6 REPLIES 6

dbevacqua
Champ in-the-making
Champ in-the-making
sorry should have previewed that post. In the second structure, the contacts should be children of the cmsSmiley Surprisedrganisation nodes:

cmsSmiley Surprisedrganisations
.. cmsSmiley Surprisedrganisation1
…. cms:contact1
.. cmsSmiley Surprisedrganisation2
.. cms:contact2
…. cmsSmiley Surprisedrganisation3
.. cms:contact3

Thanks

Dominic

dbevacqua
Champ in-the-making
Champ in-the-making
I should add that using xpath search the children also appear.

I'm confused!

andy
Champ on-the-rise
Champ on-the-rise
Hi

This sounds like a bug in delete in the lucene index code for secondary associations. I will look into this.

Regards

Andy

andy
Champ on-the-rise
Champ on-the-rise

dbevacqua
Champ in-the-making
Champ in-the-making
Cheers Andy.

Thanks for swift reply. Thought it was something along those lines. Will have a play with your fix although I am having trouble with your svn repo…


svn: Berkeley DB error while opening 'transactions' table for filesystem /home/svnadmin/svn/alfresco-open-mirror/db:
Cannot allocate memory
No error
svn: bdb: Lock table is out of available locker entries

andy
Champ on-the-rise
Champ on-the-rise
Hi

This has now been fixed. BTW, the suggested fix was not correct.

Regards

Andy