jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shane Preater" <shane.prea...@googlemail.com>
Subject Re: xpath aggregation question
Date Wed, 04 Oct 2006 13:34:28 GMT
Hi,
Thanks for the swift response.

I'll have to work out a way around the finding the parent node but hey such
is life.

I actually really like the brand idea you have proposed and I think I will
follow your advice and set it as a reference.

Cheers,
Shane.

On 04/10/06, Jukka Zitting <jukka.zitting@gmail.com> wrote:
>
> Hi,
>
> On 10/4/06, Shane Preater <shane.preater@googlemail.com> wrote:
> > I am trying to return the distinct brand property on a series of nodes
> and
> > have no idea how to go about it. Any help would be fantastic.
> >
> > for example:
> > /categories//products/*   will return all my products
> > all the nodes returned have a brand property so:
> >
> > /categories//products/*/@brand  will return all the brands
> >
> > but how make the list distinct? Or will I need to use an SQL query
> instead?
>
> Again, I'm sorry to say that the query features in JSR 170 won't help
> you there. There is no support for aggregate results, joins, or other
> advanced query features, so you'll essentially need to work around the
> limitation by post-processing the query results.
>
> But again there is an alternative where you setup separate
> referenceable brand nodes like /categories/brands/* and turn the
> @brand property of a product node into a reference. Then you can list
> all your brands by listing the children of /categories/brands and you
> will also have a very efficient way to retrieve all the products of a
> given brand.
>
> BR,
>
> Jukka Zitting
>
> --
> Yukatan - http://yukatan.fi/ - info@yukatan.fi
> Software craftsmanship, JCR consulting, and Java development
>

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