jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ard Schrijvers <a.schrijv...@onehippo.com>
Subject Re: Question about XPATH and jcr:contains
Date Mon, 20 Jul 2009 12:08:17 GMT
On Mon, Jul 20, 2009 at 1:45 PM, Bahl Christian<christian.bahl@gwvs.de> wrote:
> This looks really good.
>
> But now I´ve another question on indexing configuration. My configuration file looks
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">
>  <aggregate primaryType="nt:file">
>    <include>*</include>
>    <include>*/*</include>
>    <include>*/*/*</include>
>    <include>*/*/*/*</include>
>  </aggregate>
> </configuration>
>
> I do NOT have a special primaryType!!! My structure is:
>
> /activ/personnumber/article/jcrarticle/.../.../...
>
> The node i want to get back is jcrarticle. It´s of type "nt:unstructured" like all other
nodes too. So what primaryType should I use or better is there a possibility to configure
a path instead of primaryType?

Don't think so. If you use this aggregating, I think you can better
use some primaryType's for your 'document' kind of node to make this
nicely.

Regards Ard

>
> Thx
>
> -----Ursprüngliche Nachricht-----
> Von: Ard Schrijvers [mailto:a.schrijvers@onehippo.com]
> Gesendet: Montag, 20. Juli 2009 13:25
> An: users@jackrabbit.apache.org
> Betreff: Re: Question about XPATH and jcr:contains
>
> On Mon, Jul 20, 2009 at 1:18 PM, Bahl Christian<christian.bahl@gwvs.de> wrote:
>> Hi,
>>
>> I`ve a problem with a query in XPATH. It looks like this:
>>
>> /jcr:root//*[(@tempContent='false') and (jcr:contains(.,'*termin*') or jcr:contains(*/.,'*termin*')
or jcr:contains(*/*/.,'*termin*'))]
>>
>> I´m searching all Nodes, not beeing Temp.
>
> Apparently, the nodes that contain tempContent = false|true are the
> nodes you are interested in, right? I assume, these nodes represent
> your documents. I would advice you to make sure text indexing is done
> on the nodescope level that represent your document You can achieve
> this with index aggregates. This effectivily removes the */. and */*/.
> as you text-index all childs below the 'mytype:document' on the scope
> of  'mytype:document'. Search for indexing_configuration.xml. Take a
> look at aggregates, that is what might appeal to you
>
> regards Ard
>
>>
>> And also containing the word "termin" in the same node, the first, and second child
node. And this is my problem. Is there any solution to merge the three jcr:contains in ONE?
>>
>> In future it might be possible that there are more than 2 child nodes and therefore
I want to check all child nodes and the node itself where the property tempContent='false'.
>>
>> Thx
>> Bodo
>>
>

Mime
View raw message