[ 
https://issues.apache.org/jira/browse/OAK-12344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Thomas Mueller reassigned OAK-12344:
------------------------------------

    Assignee: Thomas Mueller

> ORDER BY: Lucene, Elastic and Oak's query engine sort missing and invalid 
> values differently
> --------------------------------------------------------------------------------------------
>
>                 Key: OAK-12344
>                 URL: https://issues.apache.org/jira/browse/OAK-12344
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>            Reporter: Anton Hosgood
>            Assignee: Thomas Mueller
>            Priority: Major
>
> For an ordered property, the Lucene and Elastic indexes place nodes without a 
> usable value (property absent, or value not convertible to the declared type) 
> differently, and both differ from the query engine:
>  - Lucene: values not matching the declared type (e.g. non-ISO-8601 strings 
> for type=Date) sort as 0 (the epoch), as do missing numbers and dates, so 
> ORDER BY returns the wrong order.
>  - Elastic: missing values sort last in both directions.
>  - Query engine (traversal, union merges): missing values sort first in 
> ascending and last in descending order, as in Jackrabbit 2.
> As a result, the same query orders results differently depending on the 
> index, and union queries with ORDER BY on such a property can place these 
> nodes in the middle of the results on both backends.
> Follow-up to OAK-12343.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to