jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sridhar Raman" <sridhar.ra...@gmail.com>
Subject Same-name siblings problem
Date Fri, 02 Feb 2007 10:01:18 GMT
I have the following node structure:

/DIM/VALS/VALUE/name = [1]
/DIM/VALS/VALUE[2]/name = [2]
/DIM/VALS/VALUE[3]/name = [3]
/DIM/VALS/VALUE[4]/name = [4]
/DIM/VALS/VALUE[13]/name = [13]

There are multiple DIM nodes. Each DIM node has ONLY one VALS node. Each
VALS node can have multiple VALUE nodes. Similarly, the VALUE nodes can have
multiple children VALUE nodes.

This is the problem I am facing:

Initially, all the VALUE nodes (1 to 13) are empty. I add nodes into them as
and when I get the data. But this is what happens when I add a child VALUE
node to /DIM/VALS/VALUE.
/DIM/VALS/VALUE/name = [1]
/DIM/VALS/VALUE/name = [2]
/DIM/VALS/VALUE[2]/name = [3]
/DIM/VALS/VALUE[3]/name = [4]
/DIM/VALS/VALUE[12]/name = [13]

Is this a bug? Or is this how it is supposed to behave?

The consequences of such a bug are immense.
Firstly, I can't do any indexing based node retrieval, as the indexes keep
changing as and when I add children to the nodes. Despite the children being
added at a level below.
Secondly, I am also facing some lucene query exceptions when I try to do a
query to obtain the right node.(Note: I am forced to do an XPATH query, as
the indexes have become inconsistent)
Thirdly, I am curious to find out how there can be 2 nodes with the same
name and same index. Shouldn't that be an automatic error?

Can someone help me with this? I do a simple parent.addNode(nodename,
nodetype) call. And I save the session. Why does that affect the indexing?

Thanks in advance,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message