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

Thomas Mueller commented on OAK-319:
------------------------------------

There is a security problem if we do it that way. The user might not have 
access rights to read the document, but he may be allowed to create nodes with 
(what he thinks is) similar content, and then use rep:similar to check whether 
the given node exists. So, we will need to add a check in the query engine to 
ensure the user has access to this node. That might still be a problem, if the 
user doesn't have access to all fields.

A second problem might be aggregation: the aggregated content is not stored in 
the document (in Lucene) with Oak.



> Similar (rep:similar) support
> -----------------------------
>
>                 Key: OAK-319
>                 URL: https://issues.apache.org/jira/browse/OAK-319
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>          Components: jcr, query
>            Reporter: Alex Parvulescu
>            Assignee: Thomas Mueller
>            Priority: Critical
>             Fix For: 0.20
>
>
> Test class is: SimilarQueryTest
> Trace:
> {noformat}
> Caused by: java.text.ParseException: Query:
> //*[rep:similar(.(*), '/testroot')]; expected: rep:similar is not supported
>       at 
> org.apache.jackrabbit.oak.query.XPathToSQL2Converter.getSyntaxError(XPathToSQL2Converter.java:963)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to