AnsweredAssumed Answered

Lucene indexer not including child aspect definitions

Question asked by dbevacqua on Oct 23, 2006
Latest reply on Oct 23, 2006 by andy
I have a number of types which extend sys:container. I use aspects to specify what types of child association each type may have, since more than one type may have the same allowed child types.

Problem is, the Lucene index does not appear to contain anything for these fields (and possibly others):

PATH
ANCESTOR
ISCONTAINER

Looking at LuceneIndexerImpl.java, I see this:


// TODO: DC: Should this also include aspect child definitions?
                QName nodeTypeRef = nodeService.getType(nodeRef);
                TypeDefinition nodeTypeDef = getDictionaryService().getType(nodeTypeRef);
                // check for child associations

                if (includeDirectoryDocuments)
                {
                    if (nodeTypeDef.getChildAssociations().size() > 0)
                    {
                        if (directPaths.contains(pair.getFirst()))
                        {
                           

the code continues, adding the fields that I mentioned that are missing.

So I'm thinking the problem here is related to that TODO. From my (admittedly limited) scenario I can't see why you'd not want to include child associations from aspects, but maybe I'm thinking about them as too similar to interfaces.

Is part of the reason perhaps that you'd have to consider nodeTypeDef.getAspectDefinition().getChildAssociations() as well as just nodeTypeDef.getChildAssociations(), i.e. there could be a performance hit?

Am I looking in the right place here? Is this likely to change? It's really rather key to what we're doing, and would require a considerable reworking of our content model to fix.

Hope you can help.


Dominic

Outcomes