jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: ORDER BY
Date Thu, 12 Dec 2013 17:41:08 GMT

On Thu, Dec 12, 2013 at 12:13 PM, Tobias Bocanegra <tripod@apache.org> wrote:
> what would be needed to implement a subset of OAK-1263, so that it
> supports OrderBy queries for well defined property types?

First we'd have to pass the ORDER BY list to the QueryIndex.query()
method, as otherwise the index lookup can't possibly order the results
properly. This could be done either by including that information in
the Filter instance or (my preference) by passing the full AST instead
of just the pre-processed Filter to the index lookup.

Once that information is available to the index lookup, we'd need a
method like Cursor.isSorted() so that the index can tell the query
engine whether the result set is already sorted. It should still be
possible for an index to return unsorted results that would then get
sorted by the query engine as a post-processing step.

Finally, we need an index implementation that can efficiently sort the
result set. The Lucene index should be easy to adapt to support this.
The property index could be extended to include optional sort order
configuration, that it would then use to organize the index content
structure to make efficient sorting of query results possible.

> Thomas suggested that we mandate that all index keys are mandated,
> also for the NodeStore.

I don't understand what you're saying here: "mandated" what? :-)


Jukka Zitting

View raw message