You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by flopsi73 <fl...@flopsi.org> on 2008/09/05 13:50:24 UTC

Indexing configuration ignored

Hello everybody,
i use an index configuration like this...

<?xml version="1.0"?>
<!DOCTYPE configuration SYSTEM
"http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd">
<configuration xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
  <index-rule nodeType="nt:resource">
    <property>jcr:data</property>
  </index-rule>
</configuration>

...assuming that now only the jcr:data property of nt:resource nodes is
indexed. But debugging into Jackrabbit (e.g. setting a breakpoint in
NodeIndexer.addStringValue, which should IMO never be touched anymore, but
in fact is) makes me think still all properties of all nodes are indexed.

Looking at the code i also cannot find where 'Indexing rules defined for a
base type also apply to sub types'
(http://wiki.apache.org/jackrabbit/IndexingConfiguration) is implemented.

So my questions are: Am i wrong in either configuration or interpretation of
code? Is the mentioned inheritance really implemented? Maybe this is better
for dev forum, so i'll also post it there...

Thanx, best regards
Flo

-- 
View this message in context: http://www.nabble.com/Indexing-configuration-ignored-tp19329590p19329590.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Indexing configuration ignored

Posted by Marcel Reutegger <ma...@gmx.net>.
Hi,

when a node is indexed and no index-rule applies, then all properties are
indexed. if you want to disable indexing for all nodes except nt:resource you
need to add a second index-rule after the one for nt:resource:

   <index-rule nodeType="nt:base">
   </index-rule>

this rule always applies because all nodes are of type nt:base.

regards
 marcel


flopsi73 wrote:
> Hello everybody,
> i use an index configuration like this...
> 
> <?xml version="1.0"?>
> <!DOCTYPE configuration SYSTEM
> "http://jackrabbit.apache.org/dtd/indexing-configuration-1.0.dtd">
> <configuration xmlns:jcr="http://www.jcp.org/jcr/1.0"
> xmlns:nt="http://www.jcp.org/jcr/nt/1.0">
>   <index-rule nodeType="nt:resource">
>     <property>jcr:data</property>
>   </index-rule>
> </configuration>
> 
> ...assuming that now only the jcr:data property of nt:resource nodes is
> indexed. But debugging into Jackrabbit (e.g. setting a breakpoint in
> NodeIndexer.addStringValue, which should IMO never be touched anymore, but
> in fact is) makes me think still all properties of all nodes are indexed.
> 
> Looking at the code i also cannot find where 'Indexing rules defined for a
> base type also apply to sub types'
> (http://wiki.apache.org/jackrabbit/IndexingConfiguration) is implemented.
> 
> So my questions are: Am i wrong in either configuration or interpretation of
> code? Is the mentioned inheritance really implemented? Maybe this is better
> for dev forum, so i'll also post it there...
> 
> Thanx, best regards
> Flo
>