You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Piotr Tajduś <pi...@skg.pl> on 2019/02/07 16:38:08 UTC

OAK - limit results in ordered query

Hi,

I am trying to get last 100 documents found by query using Lucene index. 
Query with limit works fine until I add "order by [dateProperty] desc". 
Property is marked as ordered in index, but whole date range in index  
is traversed. Is there any way to find last documents without traversing 
whole range ?


Best regards,

Piotr Tajduś



Re: OAK - limit results in ordered query

Posted by Piotr Tajduś <pi...@skg.pl>.
It seems it was cause by join between document and it's metadata, I have 
changed query to search metadata only, and now it works really fast.

Best regards,
Piotr Tajduś


On 07.02.2019 17:38, Piotr Tajduś wrote:
> Hi,
>
> I am trying to get last 100 documents found by query using Lucene 
> index. Query with limit works fine until I add "order by 
> [dateProperty] desc". Property is marked as ordered in index, but 
> whole date range in index  is traversed. Is there any way to find last 
> documents without traversing whole range ?
>
>
> Best regards,
>
> Piotr Tajduś
>
>