You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Julian Reschke (Jira)" <ji...@apache.org> on 2025/11/25 15:15:00 UTC
[jira] [Closed] (OAK-11949) Union queries should still order by score
[ https://issues.apache.org/jira/browse/OAK-11949?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Reschke closed OAK-11949.
--------------------------------
> Union queries should still order by score
> -----------------------------------------
>
> Key: OAK-11949
> URL: https://issues.apache.org/jira/browse/OAK-11949
> Project: Jackrabbit Oak
> Issue Type: Story
> Components: indexing
> Reporter: Marvin
> Assignee: Thomas Mueller
> Priority: Minor
> Fix For: 1.88.0
>
>
> Right now, union queries do not sort by score it seems. Explicitly ordering (using a hack) seems to change the result order. But we need to do this automatically.
> Alternatively, we should not make a union query, but provide the filter to elasticsearch.
> There is a workaround, but performance is very bad if there are many results in one (or more) of the union parts:
> {noformat}
> /jcr:root/content/dam//element(*, dam:Asset)[jcr:contains(., 'hello') or jcr:contains(., 'world')] order by fn:upper-case(@jcr:score) descending
> type=dam:Asset
> path=/content/dam
> fulltext=?{}?people
> orderby=@jcr:score
> orderby.case=ignore
> orderby.sort=desc
> p.guessTotal=100
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)