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

Thomas Mueller commented on OAK-6750:
-------------------------------------

[~catholicon] the change above for SelectorImpl.currentOakProperty, probably it 
makes sense to also check for {{rep:excerpt(...)}}. Not sure if there are other 
such "function properties". Checking for "(" is important.

Similarly, in currentOakProperty, I would change the following:
{noformat}
        } else if (oakPropertyName.startsWith(QueryConstants.REP_EXCERPT + 
"(")) {
            result = currentRow.getValue(oakPropertyName);
...
        } else if (oakPropertyName.startsWith(QueryConstants.REP_FACET + "(")) {
            result = currentRow.getValue(oakPropertyName);
{noformat}


> Lucene facets don't work with relative properties
> -------------------------------------------------
>
>                 Key: OAK-6750
>                 URL: https://issues.apache.org/jira/browse/OAK-6750
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: lucene
>            Reporter: Vikas Saurabh
>            Assignee: Vikas Saurabh
>              Labels: candidate_oak_1_4, candidate_oak_1_6
>             Fix For: 1.8
>
>         Attachments: OAK-6750-testCase.patch
>
>
> Facets currently work only when faceted dimension is direct property of 
> selected node e.g. 
> {noformat}
> select \[jcr:path], \[rep:facet(jc/text)] from \[nt:base] where ... 
> {noformat}
> doesn't work but 
> {noformat}
> select \[jcr:path], \[rep:facet(text)] from \[nt:base] where ... 
> {noformat}
> works (assume correct index defs).
> The issue is that {{ast/SelectorImpl#currentOakProperty}} check if 
> {{rep:facet(jc/text)}} is a relative path or not and incorrectly 'feels' that 
> it indeed is - it then proceeds ahead to traverse down a tree with elements 
> \[{{rep:facet(jc}}, {{text)}}\] which makes no sense.
> /cc [~teofili], [~tmueller]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to