You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Alex Parvulescu (JIRA)" <ji...@apache.org> on 2013/11/19 11:45:22 UTC

[jira] [Comment Edited] (JCR-3693) Lucene configuration - aggregation definition : problem with include-property tag

    [ https://issues.apache.org/jira/browse/JCR-3693?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13826376#comment-13826376 ] 

Alex Parvulescu edited comment on JCR-3693 at 11/19/13 10:43 AM:
-----------------------------------------------------------------

I agree, this looks like an issue with the code that includes the aggregates.

The first option works because the entire node is copied over so the property that you need is included too.

The second option is where things get interesting:
Going through the code, it looks like the property is identified and the string value is extracted (I verified this) [0]. What I don't understand is why it doesn't make it to the destination document.

Example using option 2: I'm trying to include 'jcr:title' from the child node 'jcr:content/metadata/jcr:title':

This is the child node's lucene document relevant (that include title) fields:
* indexed,tokenized,omitNorms<1570322:FULL:title:santaclaus>
* indexed,tokenized,omitNorms<1570322:FULL:title:santaclaus>
* indexed,omitNorms<_:PROPERTY_LENGTHS:1570322:title[1000000000000a>

The indexing code correctly identifies a property, and extracts the value:
* '{http://www.jcp.org/jcr/1.0}title' turns into './1570322:content/0:metadata/1570322:title[santaclaus'

Next things don't look so well:
* the _SingletonTokenStream_ field that was supposed (I think) to have the value doesn't appear to:  'indexed,tokenized<_:PROPERTIES:>'
* the aggregated uuid on the other hand does: 'indexed,omitNorms<_:AGGR_NODE_UUID:eafaa177-77b8-47dc-9b91-ec0b85548cf8>'

In the end these 2 new fields go into the new lucene document, but that doesn't match the search because it doesn't contain the tokens.


[0] http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java?view=markup#1561



was (Author: alex.parvulescu):
I agree, this looks like an issue with the code that includes the aggregates.

The first option works because the entire node is copied over so the property that you need is included too.

The second option is where things get interesting:
Going through the code, it looks like the property is identified and the string value is extracted (I verified this) [0]. What I don't understand is why it doesn't make it to the destination document.

Example using option 2: I'm trying to include jcr:title from the child node:

This is the child node's lucene document relevant (that include title) fields:
 * indexed,tokenized,omitNorms<1570322:FULL:title:santaclaus>
* indexed,tokenized,omitNorms<1570322:FULL:title:santaclaus>
* indexed,omitNorms<_:PROPERTY_LENGTHS:1570322:title[1000000000000a>

The indexing code correctly identifies a property, and extracts the value:
* _{http://www.jcp.org/jcr/1.0}title_ turns into _./1570322:content/0:metadata/1570322:title[santaclaus_

Next things don't look so well:
* the _SingletonTokenStream_ field that was supposed (I think) to have the value doesn't appear to:  _indexed,tokenized<_:PROPERTIES:>_
* the aggregated uuid on the other hand does: _indexed,omitNorms<_:AGGR_NODE_UUID:eafaa177-77b8-47dc-9b91-ec0b85548cf8>_

In the end these 2 new fields go into the new lucenedocument, but that doesn't match the search beacause it doesn't contain the tokens.



[0] http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java?view=markup#1561


> Lucene configuration - aggregation definition : problem with include-property tag
> ---------------------------------------------------------------------------------
>
>                 Key: JCR-3693
>                 URL: https://issues.apache.org/jira/browse/JCR-3693
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: indexing
>    Affects Versions: 2.7.2
>            Reporter: Geoffroy Schneck
>
> In our example , we want to limit the properties to search on for Dam Assets on "jcr:title" metadata property.
> In [http://wiki.apache.org/jackrabbit/IndexingConfiguration] I see aggregation can be defined at property level.
> Following the example, I tried 2 different config :
> 1)
> {code}<aggregate primaryType="dam:Asset">
> 		<include>jcr:content/metadata</include>
>         <include-property>jcr:content/metadata/jcr:title</include-property>
>     </aggregate>{code}
> 2)
> {code}<aggregate primaryType="dam:Asset">
>         <include-property>jcr:content/metadata/jcr:title</include-property>
> property>
>     </aggregate>{code}
> and then tried the result of each performing a fulltext search like */jcr:root/content/dam/geometrixx/offices//element(,dam:Asset)[jcr:contains(., 'somevalue')]*
> Problem : in config 1) , if another property on the metadata node has this value , the search returns the corresponding node.
> In config 2) , nothing is found even if jcr:title has the value 'somevalue'...



--
This message was sent by Atlassian JIRA
(v6.1#6144)