On 24.09.2012, at 10:29, Arunas F <[email protected]> wrote:

> 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>
> 
> SELECT * FROM [t:A] AS a WHERE a.[prop_from_data_node]= 'content'

The indexing configuration above is used for the full text index on the node 
scope, using jcr:contains (xpath) or CONTAINS (sql). E.g. in xpath:

//element(*, t:A)[jcr:contains(., "content")

would now return a result, as the properties in t:dataflow/t:data would also be 
put in the full-text index for the t:A nodes.

For your query using an equals you can already do that without any special 
index configuration as relative child property paths are possible:

//element(*, t:A)[@t:dataflow/t:data = "content"]

Don't know exactly how the sql/sql2 query for that looks like, but the concept 
(and actual index behavior) should be the same.

Cheers,
Alex

Reply via email to