[
https://issues.apache.org/jira/browse/OAK-8571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16913249#comment-16913249
]
Piotr Tajduś commented on OAK-8571:
-----------------------------------
Proposed fix:
{code:java}
@Override
public AstElement copyOf() {
String fullName;
if (relativePath != null) {
fullName = PathUtils.concat(relativePath, propertyName);
} else {
fullName = propertyName;
}
return new FullTextSearchImpl(selectorName, fullName,
fullTextSearchExpression);
}
{code}
> FullTextSearchImpl.copyOf() - relative path lost in copy
> --------------------------------------------------------
>
> Key: OAK-8571
> URL: https://issues.apache.org/jira/browse/OAK-8571
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Affects Versions: 1.14.0
> Reporter: Piotr Tajduś
> Priority: Major
>
> Property passed in constructor to FullTextSearchImpl is split and stored as
> relativePath and propertyName. In method copyOf only propertyName is passed
> and relativePath is lost in new instance:
> @Override
> public AstElement copyOf() {
> return new FullTextSearchImpl(selectorName, propertyName,
> fullTextSearchExpression);
> }
> Because of that alternative query may be constrainted by non existing
> properties, f.e. instead of CONTAINS([d].[metadane/korespondent/*/*/nazwa]
> we have contains([d].[nazwa],
>
>
--
This message was sent by Atlassian Jira
(v8.3.2#803003)