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 "Thomas Mueller (JIRA)" <ji...@apache.org> on 2017/10/06 12:37:00 UTC

[jira] [Commented] (OAK-6792) rep:facet not supported in xpath

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

Thomas Mueller commented on OAK-6792:
-------------------------------------

Yes, currently it looks like this only works with SQL-2, according to the docs at http://jackrabbit.apache.org/oak/docs/query/query-engine.html#Facets

But I think the syntax would need to be slightly different, as the above would be converted to "where [rep:facet(jcr:createdBy)] is not null". You probably (?) want something like this (see xpath syntax for [suggestions|http://jackrabbit.apache.org/oak/docs/query/query-engine.html#Suggestions]):

{noformat}
/jcr:root//*/(rep:facet(jcr:createdBy))
{noformat}

> rep:facet not supported in xpath
> --------------------------------
>
>                 Key: OAK-6792
>                 URL: https://issues.apache.org/jira/browse/OAK-6792
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: query
>            Reporter: Vikas Saurabh
>
> Parsing
> {noformat}
> //element(*, app:Asset)[rep:facet(jcr:createdBy)]
> {noformat}
> gives following exception.
> {noformat}
> javax.jcr.query.InvalidQueryException: java.text.ParseException: Query:
> //element(*, app:Asset)[rep:facet(jcr:createdBy(*))]; expected: jcr:like | jcr:contains | jcr:score | xs:dateTime | fn:lower-case | fn:upper-case | fn:name | rep:similar | rep:spellcheck | rep:suggest
> {noformat}
> /cc [~tmueller]



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