Hi Florent,
Florent Guillaume wrote:
Hi,
I have a node that has lots of unordered children nodes. Some of these
nodes are "real children" in the document management sense, the others
(in small number) are just nodes that hold complex datatypes but are
really part of the main document.
I'd like to access both categories of nodes in an efficient manner:
- get only the nodes for my complex datatypes,
- get the list of "real children" nodes.
when you say 'get a list of child nodes' isn't it easier just using the
api instead of a query? Node.getNodes() and then have a custom
NodeIterator that filters out unnecessary nodes?
I have flexibility in deciding how these node are typed. I can have
mixin types that are used as marker interface for these two categories.
Or (preferably) I can rely on the supertypes for my node types to
distinguish between the two.
What would you recommend so that my queries are processed efficiently,
using underlying indexes?
using different types for the child nodes is definitively a good idea,
as it helps narrowing down the set of nodes that may match.
regards
marcel