You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Sa...@bosch-si.com on 2012/03/28 14:01:56 UTC

Query orders dates lexically

Hi all,

 

I have a query that looks like:

 

SELECT * FROM custom:node ORDER BY custom:date

 

The strange thing is that I do now get the results in lexically order
instead of the order by date. How do I force Jackrabbit to order the
result by date and not lexically?

 

PS: I can also replace custom:date with jcr:created and result is the
same => lexically ordering

 

BR,

 

Sascha


Re: Query on references (performance)

Posted by Ard Schrijvers <a....@onehippo.com>.
On Mon, Apr 2, 2012 at 3:17 PM, De Georges, Adrien
<Ad...@experian.com> wrote:
> Hi Ard and thanks for your prompt reply.
> I would like to have all the reference properties of all the nodes below
> a given node (so option 2).
> I currently have a process to retrieve these properties. But I would
> like to have your input because I think it can be faster.

You cannot directly query for it: A query result will return nodes. If
you would have all references stored in a property name that is fixed,
you could at least query for all the nodes that have that property

Regards Ard

> Thanks
>
> -----Original Message-----
> From: Ard Schrijvers [mailto:a.schrijvers@onehippo.com]
> Sent: 02 April 2012 15:06
> To: users@jackrabbit.apache.org
> Subject: Re: Query on references (performance)
>
> On Mon, Apr 2, 2012 at 3:01 PM, De Georges, Adrien
> <Ad...@experian.com> wrote:
>> If somebody has any experience on this subject it would be nice.
>>
>> Hi guys,
>>
>> In term of performances, I would like to know the best way to retrieve
>
>> all the properties of 'REFERENCE' type under a node
>
> You mean just the properties of the node you have, or all the reference
> properties of all the descendant nodes below some node?
>
> Regards Ard
>
>> Thanks
>>
>> Adrien
>>
>>
>>
>> Information in this e-mail and any attachments is confidential, and
>> may not be copied or used by anyone other than the addressee, nor
>> disclosed to any third party without our permission. There is no
>> intention to create any legally binding contract or other binding
>> commitment through the use of this electronic communication unless it
>> is issued in accordance with the Experian Limited standard terms and
>> conditions of purchase or other express written agreement between
>> Experian Limited and the recipient. Although Experian has taken
>> reasonable steps to ensure that this communication and any attachments
>
>> are free from computer virus, you are advised to take your own steps
>> to ensure that they are actually virus free.
>>
>> Companies Act information: Registered name: Experian Limited.
>> Registered
>> office: Landmark House, Experian Way, NG2 Business Park, Nottingham,
>> NG80 1ZZ, United Kingdom. Place of registration: England and Wales.
>> Registered number: 653331
>>
>
>
>
> --
> Amsterdam - Oosteinde 11, 1017 WT Amsterdam Boston - 1 Broadway,
> Cambridge, MA 02142
>
> US +1 877 414 4776 (toll free)
> Europe +31(0)20 522 4466
> www.onehippo.com



-- 
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com

RE: Query on references (performance)

Posted by "De Georges, Adrien" <Ad...@experian.com>.
Hi Ard and thanks for your prompt reply.
I would like to have all the reference properties of all the nodes below
a given node (so option 2).
I currently have a process to retrieve these properties. But I would
like to have your input because I think it can be faster.
Thanks

-----Original Message-----
From: Ard Schrijvers [mailto:a.schrijvers@onehippo.com] 
Sent: 02 April 2012 15:06
To: users@jackrabbit.apache.org
Subject: Re: Query on references (performance)

On Mon, Apr 2, 2012 at 3:01 PM, De Georges, Adrien
<Ad...@experian.com> wrote:
> If somebody has any experience on this subject it would be nice.
>
> Hi guys,
>
> In term of performances, I would like to know the best way to retrieve

> all the properties of 'REFERENCE' type under a node

You mean just the properties of the node you have, or all the reference
properties of all the descendant nodes below some node?

Regards Ard

> Thanks
>
> Adrien
>
>
>
> Information in this e-mail and any attachments is confidential, and 
> may not be copied or used by anyone other than the addressee, nor 
> disclosed to any third party without our permission. There is no 
> intention to create any legally binding contract or other binding 
> commitment through the use of this electronic communication unless it 
> is issued in accordance with the Experian Limited standard terms and 
> conditions of purchase or other express written agreement between 
> Experian Limited and the recipient. Although Experian has taken 
> reasonable steps to ensure that this communication and any attachments

> are free from computer virus, you are advised to take your own steps 
> to ensure that they are actually virus free.
>
> Companies Act information: Registered name: Experian Limited. 
> Registered
> office: Landmark House, Experian Way, NG2 Business Park, Nottingham,
> NG80 1ZZ, United Kingdom. Place of registration: England and Wales.
> Registered number: 653331
>



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam Boston - 1 Broadway,
Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com

Re: Query on references (performance)

Posted by Ard Schrijvers <a....@onehippo.com>.
On Mon, Apr 2, 2012 at 3:01 PM, De Georges, Adrien
<Ad...@experian.com> wrote:
> If somebody has any experience on this subject it would be nice.
>
> Hi guys,
>
> In term of performances, I would like to know the best way to retrieve
> all the properties of 'REFERENCE' type under a node

You mean just the properties of the node you have, or all the
reference properties of all the descendant nodes below some node?

Regards Ard
.
> Thanks
>
> Adrien
>
>
>
> Information in this e-mail and any attachments is confidential, and may
> not be copied or used by anyone other than the addressee, nor disclosed
> to any third party without our permission. There is no intention to
> create any legally binding contract or other binding commitment through
> the use of this electronic communication unless it is issued in
> accordance with the Experian Limited standard terms and conditions of
> purchase or other express written agreement between Experian Limited and
> the recipient. Although Experian has taken reasonable steps to ensure
> that this communication and any attachments are free from computer
> virus, you are advised to take your own steps to ensure that they are
> actually virus free.
>
> Companies Act information: Registered name: Experian Limited. Registered
> office: Landmark House, Experian Way, NG2 Business Park, Nottingham,
> NG80 1ZZ, United Kingdom. Place of registration: England and Wales.
> Registered number: 653331
>



-- 
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com

RE: Query on references (performance)

Posted by "De Georges, Adrien" <Ad...@experian.com>.
If somebody has any experience on this subject it would be nice.
Thanks in advance

-----Original Message-----
From: De Georges, Adrien [mailto:Adrien.DeGeorges@experian.com] 
Sent: 30 March 2012 16:11
To: users@jackrabbit.apache.org
Subject: Query on references

Hi guys,

In term of performances, I would like to know the best way to retrieve
all the properties of 'REFERENCE' type under a node.
Thanks

Adrien



Information in this e-mail and any attachments is confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission. There is no intention to
create any legally binding contract or other binding commitment through
the use of this electronic communication unless it is issued in
accordance with the Experian Limited standard terms and conditions of
purchase or other express written agreement between Experian Limited and
the recipient. Although Experian has taken reasonable steps to ensure
that this communication and any attachments are free from computer
virus, you are advised to take your own steps to ensure that they are
actually virus free. 

Companies Act information: Registered name: Experian Limited. Registered
office: Landmark House, Experian Way, NG2 Business Park, Nottingham,
NG80 1ZZ, United Kingdom. Place of registration: England and Wales.
Registered number: 653331


Query on references

Posted by "De Georges, Adrien" <Ad...@experian.com>.
Hi guys,

In term of performances, I would like to know the best way to retrieve
all the properties of 'REFERENCE' type under a node.
Thanks

Adrien



Information in this e-mail and any attachments is confidential, and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other binding commitment through the use of this electronic communication unless it is issued in accordance with the Experian Limited standard terms and conditions of purchase or other express written agreement between Experian Limited and the recipient. Although Experian has taken reasonable steps to ensure that this communication and any attachments are free from computer virus, you are advised to take your own steps to ensure that they are actually virus free. 

Companies Act information: Registered name: Experian Limited. Registered office: Landmark House, Experian Way, NG2 Business Park, Nottingham, NG80 1ZZ, United Kingdom. Place of registration: England and Wales. Registered number: 653331


AW: Query orders dates lexically

Posted by Sa...@bosch-si.com.
Hi Alex,

the problem was between keyboard and chair so just forget my question :-)

But anyway thanks for your support and fast reply!

BR,

Sascha


-----Ursprüngliche Nachricht-----
Von: Alex Parvulescu [mailto:alex.parvulescu@gmail.com] 
Gesendet: Mittwoch, 28. März 2012 16:28
An: users@jackrabbit.apache.org
Betreff: Re: Query orders dates lexically

Hi Sascha,

can you give some examples? like you test input & output.

It is really easy to add/reuse a test in jackrabbit-core to check if things
work properly.

In your case you can take a look at the sql2 order by tests [0].


best,
alex

[0]
http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/SQL2OrderByTest.java


On Wed, Mar 28, 2012 at 2:01 PM, <Sa...@bosch-si.com> wrote:

> Hi all,
>
>
>
> I have a query that looks like:
>
>
>
> SELECT * FROM custom:node ORDER BY custom:date
>
>
>
> The strange thing is that I do now get the results in lexically order
> instead of the order by date. How do I force Jackrabbit to order the
> result by date and not lexically?
>
>
>
> PS: I can also replace custom:date with jcr:created and result is the
> same => lexically ordering
>
>
>
> BR,
>
>
>
> Sascha
>
>

Re: Query orders dates lexically

Posted by Alex Parvulescu <al...@gmail.com>.
Hi Sascha,

can you give some examples? like you test input & output.

It is really easy to add/reuse a test in jackrabbit-core to check if things
work properly.

In your case you can take a look at the sql2 order by tests [0].


best,
alex

[0]
http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/SQL2OrderByTest.java


On Wed, Mar 28, 2012 at 2:01 PM, <Sa...@bosch-si.com> wrote:

> Hi all,
>
>
>
> I have a query that looks like:
>
>
>
> SELECT * FROM custom:node ORDER BY custom:date
>
>
>
> The strange thing is that I do now get the results in lexically order
> instead of the order by date. How do I force Jackrabbit to order the
> result by date and not lexically?
>
>
>
> PS: I can also replace custom:date with jcr:created and result is the
> same => lexically ordering
>
>
>
> BR,
>
>
>
> Sascha
>
>