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 "Piotr Tajduś (Jira)" <ji...@apache.org> on 2019/08/22 11:44:00 UTC

[jira] [Commented] (OAK-8571) FullTextSearchImpl.copyOf() - relative path lost in copy

    [ 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)