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 "Vikas Saurabh (JIRA)" <ji...@apache.org> on 2018/02/08 03:56:00 UTC

[jira] [Commented] (OAK-7252) Function index for name() and localname() don't allow sorting

    [ https://issues.apache.org/jira/browse/OAK-7252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16356454#comment-16356454 ] 

Vikas Saurabh commented on OAK-7252:
------------------------------------

[~tmueller], afaics, {{NodeNameImpl}} should have following to allow sorting on node name:
{noformat}
diff --git a/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeNameImpl.java b/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeNameImpl.java
index cd1a884d9e..b5bce13e11 100644
--- a/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeNameImpl.java
+++ b/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/NodeNameImpl.java
@@ -186,7 +186,7 @@ public class NodeNameImpl extends DynamicOperandImpl {
             return null;
         }
         return new OrderEntry(
-                QueryConstants.RESTRICTION_NAME, 
+                QueryConstants.FUNCTION_RESTRICTION_PREFIX + getFunction(s),
             Type.STRING, 
             o.isDescending() ? 
             OrderEntry.Order.DESCENDING : OrderEntry.Order.ASCENDING);
{noformat}

(similar change is required for local name too... I just am not sure if I'm thinking in the right direction)

> Function index for name() and localname() don't allow sorting
> -------------------------------------------------------------
>
>                 Key: OAK-7252
>                 URL: https://issues.apache.org/jira/browse/OAK-7252
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: lucene
>            Reporter: Vikas Saurabh
>            Assignee: Vikas Saurabh
>            Priority: Major
>             Fix For: 1.10
>
>
> There is no way currently to have indexed based sorting on nodename - function index implementation for node name and local name doesn't provide correct order entry that would match a property definition for corresponding function index.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)