jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arunas F <arun...@gmail.com>
Subject Aggregate index usage
Date Mon, 24 Sep 2012 08:29:12 GMT
Hello Jackrabbit community,
As Jackrabbit is very slow while using joins in queries, I want to use queries 
on a single node level. But the content on which I want to run queries is also 
two level below. So I'd like to take advantage of using aggregated indexes. As 
the jackrabbit wiki states I can  “... include the contents of descendant nodes 
into a single node ...”. But there is no documentation how could I use these 
aggregated indexes.

This is what I'm trying to do.

The content layout is:

[type:A] > nt:hierarchyNode
…
+ t:dataflow (type:C)
…

[type:B]
…

[type:C] > type:B
…
+ t:data (nt:unstructured)


Workspace indexing_configuration.xml:

<?xml version="1.0"?>
<!DOCTYPE configuration SYSTEM "http://jackrabbit.apache.org/dtd/indexing-
configuration-1.2.dtd">
<configuration
        xmlns:nt="http://www.jcp.org/jcr/nt/2.0"
        xmlns:t="http://......">

     <aggregate primaryType="t:A">
         <include>t:dataflow/t:data</include>
    </aggregate>
</configuration>

(I also tried other <include> variations like “*/*” and etc.) 


And my JCR_SLQ2 query:

SELECT * FROM [t:A] AS a WHERE a.[prop_from_data_node]= 'content'

(“prop_from_data_node” here is a property from a t:data node).


And the data in the workspace is:

/A(t:A)[node]/t:dataflow(type:C)[node]/t:data(nt:unstructured)
[node]/prop_from_data_node='content'(string)[property]

Running a query in this case returns 0 matches but I expect the node to be 
selected.
Can you explain what I'm doing wrong and how should I use index aggregates?

Thank you.

Best regards,
Arunas F


Mime
View raw message