jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daglian, Michael \(IT\)" <Michael.Dagl...@morganstanley.com>
Subject Query on node name
Date Fri, 15 Sep 2006 15:00:07 GMT
Hi everyone,

I know that this question has been asked before and that the very
reasonable answer is that the JCR 1.0 spec does not prescribe support
for querying based upon the node name in a path. However, a message from
February by Marcel
4.html) seems to imply a Jackrabbit-specific extension that added
support for this feature. Unfortunately I was unable to reproduce
successful matching following the example contained in the message. So I
have a couple of other questions:

1. Does search on node name still exist as a Jackrabbit extension? (it
very well might and my test case is wrong!)

2. If not, would the following be a reasonable method for adding this
support (at least partially) specifically to a local build (which is
able to constrain usage):

a) Modify org.apache.jackrabbit.core.query.lucene.NodeIndexer#createDoc
to add the following line:

doc.add(new Field(FieldNames.FULLTEXT, name, false, true, true)); 

where name is the name calculated for all child nodes. Our usage would
allow us to subsequently filter out those nodes that do not actually
match based upon node name but rather another property value. A
preferred alternative for us would be to have a property created that
only exists in a non-public namespace to allow us to not have to
post-process the results but I could not figure out how to make this
work (advice would be most appreciated :) ).

The solution above certainly represents a quick-fix and I have not had
the opportunity to assess the potential ramifications. However, there is
definitely a need on our end for this feature before JSR-283 adds
jcr:local-name() support.

Thanks in advance!

-- Mike

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to
waive confidentiality or privilege. Use of this email is prohibited when received in error.

View raw message