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 2015/04/21 11:54:59 UTC

[jira] [Commented] (OAK-2281) Support for conditional indexingRules

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

Thomas Mueller commented on OAK-2281:
-------------------------------------

What is the reason (use case) for this request? Is it to 

(a) save disk space / speed up indexing
(b) filter query results

If it's (b), I think the _index_ itself does not need to support such rules, if that means the query returns the incorrect data. Instead, the _query_ should be changed to filter out the nodes you don't want (" and @priority = 'high'" for example).

> Support for conditional indexingRules
> -------------------------------------
>
>                 Key: OAK-2281
>                 URL: https://issues.apache.org/jira/browse/OAK-2281
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: lucene
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>
> JR2 supported conditional indexing rules like below. Similar support should be provided within Oak
> {code:xml}
> <configuration xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
>   <index-rule nodeType="nt:unstructured"
>               boost="2.0"
>               condition="ancestor::*/@priority = 'high'">
>     <property>Text</property>
>   </index-rule>
>   <index-rule nodeType="nt:unstructured"
>               boost="0.5"
>               condition="parent::foo/@priority = 'low'">
>     <property>Text</property>
>   </index-rule>
>   <index-rule nodeType="nt:unstructured"
>               boost="1.5"
>               condition="bar/@priority = 'medium'">
>     <property>Text</property>
>   </index-rule>
>   <index-rule nodeType="nt:unstructured">
>     <property>Text</property>
>   </index-rule>
> </configuration>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)