jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@gmail.com>
Subject Re: Same-name siblings problem
Date Mon, 05 Feb 2007 10:06:34 GMT
On 2/5/07, Sridhar Raman <sridhar.raman@gmail.com> wrote:
> I am using Jackrabbit 1.1.
>
> I am using same name siblings for the following reason:
> Every DIM has a VALUES node. This VALUES node is the root for a tree
> structure of VALUE nodes. Hence, when I do a query for a particular value, I
> can do it using a simple query.
>
> I am sorry ... I didn't understand your question regarding the test case.
> Let me try explaining the problem.
> I have 13 VALUE nodes which are like buckets. And into these buckets, I
> would be adding new VALUE nodes dynamically. eg. If the buckets were [A-D],
> [E-H], and so on. I would look at the new value, find out its first letter
> and create a VALUE node for it which would be added into the appropriate
> bucket.
> The problem I face happens when I add this new node. I am adding a node to a
> particular bucket. I find it hard to understand how the indexing of a level
> higher is affected.
>
> One more new problem I face is that after a certain number of nodes have
> been added, the structure is totally gone. In fact, my dump at the end of an
> import looks somewhat like this:
>
> /DIM
> /DIM/VALS
> /DIM/VALS/VALUE
> /DIM/VALS/VALUE/name = [1]
> /DIM/VALS/VALUE/VALUE/
> /DIM/VALS/VALUE/VALUE/name = 1.1
> /VALUE
> ...
> /VALUE[2]
> ...
>
> This is really bizarre!

hmm, i would guess that there's a problem in your application's code.
please send your code or provide a simple test case (i.e. a small test
class that demonstrates your issue), otherwise we won't be able to
help you.

cheers
stefan

>
> I am running the code using version 1.2.1. I hope that solves this problem.
> But any form of help, I would really appreciate it.
>
> Thanks in advance,
> Sridhar
>
> On 2/4/07, Tobias Bocanegra <tobias.bocanegra@day.com> wrote:
> >
> > hi sridhar,
> > can you provide a test case that reproduces your problem?
> > what version of jackrabbit are you using?
> >
> > generally, i would avoid using same name siblings since it causes
> > always a lot of trouble and is not very performant. use some useful
> > node name or just a simple number.
> >
> > regards, toby
> >
> > On 2/4/07, Sridhar Raman <sridhar.raman@gmail.com> wrote:
> > > I still haven't been able to tackle the problem. An additional thing
> > that
> > > seems to be happening is that after a certain point of time, the nodes
> > get
> > > added to the root (I have no idea how!).
> > >
> > > But can someone help me with the initial problem I had posted?
> > >
> > > Thanks,
> > > Sridhar
> > >
> > > On 2/2/07, Sridhar Raman <sridhar.raman@gmail.com> wrote:
> > > >
> > > > I have the following node structure:
> > > >
> > > > /DIM
> > > > /DIM/VALS
> > > > /DIM/VALS/VALUE
> > > > /DIM/VALS/VALUE/name = [1]
> > > > /DIM/VALS/VALUE[2]
> > > > /DIM/VALS/VALUE[2]/name = [2]
> > > > /DIM/VALS/VALUE[3]
> > > > /DIM/VALS/VALUE[3]/name = [3]
> > > > /DIM/VALS/VALUE[4]
> > > > /DIM/VALS/VALUE[4]/name = [4]
> > > > ...
> > > > ...
> > > > ...
> > > > /DIM/VALS/VALUE[13]
> > > > /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
> > > > /DIM/VALS
> > > > /DIM/VALS/VALUE
> > > > /DIM/VALS/VALUE/name = [1]
> > > > /DIM/VALS/VALUE/VALUE/
> > > > /DIM/VALS/VALUE/VALUE/name = 1.1
> > > > /DIM/VALS/VALUE
> > > > /DIM/VALS/VALUE/name = [2]
> > > > /DIM/VALS/VALUE[2]
> > > > /DIM/VALS/VALUE[2]/name = [3]
> > > > /DIM/VALS/VALUE[3]
> > > > /DIM/VALS/VALUE[3]/name = [4]
> > > > ...
> > > > ...
> > > > ...
> > > > /DIM/VALS/VALUE[12]
> > > > /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,
> > > > Sridhar
> > > >
> > >
> >
> >
> > --
> > -----------------------------------------< tobias.bocanegra@day.com >---
> > Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
> > T +41 61 226 98 98, F +41 61 226 98 97
> > -----------------------------------------------< http://www.day.com >---
> >
>
>

Mime
View raw message