You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Radu Ana-Maria <ra...@gmail.com> on 2009/09/09 10:14:51 UTC

indexing configuration

hello,

i've just read the information on
http://wiki.apache.org/jackrabbit/IndexingConfiguration, and i so something
like this:
"

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

"

i have some questions:
1. since the condition for ancestor can be write :*/ for the parent can be
write as well yes?
      - because i write something like this:
                       <index-rule nodeType="th:plainDocument"
condition="parent::*/@versionDoc = 'da' ">
                       </index-rule>
         and all the nodes of type plainDocument  are still indexing even if
are children of a node that have property <<versionDoc = 'da'>> am i missing
something in my code?

2. can i make a condition that referes a parent of a parent :
                      <index-rule nodeType="th:plainDocument"
condition="parent::*/*/@versionDoc = 'da' ">
                       </index-rule> (the node's are still indexed ..this
code is ignored)
         is this a correct code? if not, can i do this in an other way? how?


10x,
ana

Re: indexing configuration

Posted by Radu Ana-Maria <ra...@gmail.com>.
10x for the reply but i found the solution! my parent property node
@versionDoc = 'da'  was not indexed..
 initialy i thought that this configuration property was read from tables
database but, i found that it isn't like this!

ana


On Fri, Sep 11, 2009 at 5:29 PM, Marcel Reutegger
<ma...@gmx.net>wrote:

> Hi,
>
> On Wed, Sep 9, 2009 at 10:14, Radu Ana-Maria <ra...@gmail.com> wrote:
> > i have some questions:
> > 1. since the condition for ancestor can be write :*/ for the parent can
> be
> > write as well yes?
>
> yes, that's possible as well.
>
> >      - because i write something like this:
> >                       <index-rule nodeType="th:plainDocument"
> > condition="parent::*/@versionDoc = 'da' ">
> >                       </index-rule>
> >         and all the nodes of type plainDocument  are still indexing even
> if
> > are children of a node that have property <<versionDoc = 'da'>> am i
> missing
> > something in my code?
>
> that looks correct. can you please post the complete configuration
> together with the node type definitions that you have? thanks.
>
> > 2. can i make a condition that referes a parent of a parent :
> >                      <index-rule nodeType="th:plainDocument"
> > condition="parent::*/*/@versionDoc = 'da' ">
> >                       </index-rule> (the node's are still indexed ..this
> > code is ignored)
> >         is this a correct code? if not, can i do this in an other way?
> how?
>
> that's not possible. you cannot use multiple slashes in a condition.
>
> regards
>  marcel
>

Re: indexing configuration

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

On Wed, Sep 9, 2009 at 10:14, Radu Ana-Maria <ra...@gmail.com> wrote:
> i have some questions:
> 1. since the condition for ancestor can be write :*/ for the parent can be
> write as well yes?

yes, that's possible as well.

>      - because i write something like this:
>                       <index-rule nodeType="th:plainDocument"
> condition="parent::*/@versionDoc = 'da' ">
>                       </index-rule>
>         and all the nodes of type plainDocument  are still indexing even if
> are children of a node that have property <<versionDoc = 'da'>> am i missing
> something in my code?

that looks correct. can you please post the complete configuration
together with the node type definitions that you have? thanks.

> 2. can i make a condition that referes a parent of a parent :
>                      <index-rule nodeType="th:plainDocument"
> condition="parent::*/*/@versionDoc = 'da' ">
>                       </index-rule> (the node's are still indexed ..this
> code is ignored)
>         is this a correct code? if not, can i do this in an other way? how?

that's not possible. you cannot use multiple slashes in a condition.

regards
 marcel