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 "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2017/08/30 04:07:00 UTC

[jira] [Commented] (OAK-4906) Lucene: Support relative property based query by transforming the path

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

Chetan Mehrotra commented on OAK-4906:
--------------------------------------

bq. 3b. If indexNodeName=true add constraint for NAME() = 'jcr:content'

This would be useful but requires some more changes in the flow as per current implementation. This feature is mostly useful for index on nt:base and there we anyway recommend to not index node names as it would lead indexing of all nodes. So added complexity is not worth for now. Can revisit later

Added support in 1806659

> Lucene: Support relative property based query by transforming the path
> ----------------------------------------------------------------------
>
>                 Key: OAK-4906
>                 URL: https://issues.apache.org/jira/browse/OAK-4906
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: lucene
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>            Priority: Minor
>             Fix For: 1.8, 1.7.7
>
>
> PropertyIndex supports query like below
> {noformat}
> /jcr:root//*[jcr:content/@keywords]
> {noformat}
> For such query _keywords_ property is indexed and the as part of Cursor returned for the query the path is transformed to return the parent path if the parent node is _jcr:content_
> Currently LucenePropertyIndex supports indexing relative properties wrt base node like {{jcr:content/metadata/status}}. Here it would index the relative property by refererring to its relative name. 
> To simplify switch to LucenePropertyIndex (as part of hybrid index support) LucenePropertyIndex should also support for such queries where property index definition only specifies indexing _keywords_ but the query is using a relative property. So LucenePropertyIndex should
> # First check if it has a property definition for _jcr:content/keywords_
> # If not check if the indexingRule is for nt:base
> # If yes check if it has property definition for _keywords_
> # If yes then use the index to evaluate the query and return transformed result
> LucenePropertyIndex already do such transformations for fulltext constraints. With this we extend that support for property restrictions also



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