jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From avim <avi.mor...@timetoknow.org>
Subject Re: [JCR Browser] many to many relations/flexible hierarchies/references
Date Mon, 26 Feb 2007 13:06:43 GMT

What is the score in this case?
Anyway I don't think it will give me the desired order, and there is a need
for kind of predicates/relations with extra data/connection objects anyway.
Any advice/best practices?

Marcel Reutegger wrote:
> 
> avim wrote:
>> I have many to many relations represented in JCR by multi-valued
>> REFERENCE
>> properties and usually the order is crucial. I've found out that
>> jcr:deref
>> doesn't maintain the order of (it's input) multi-valued REFERENCE
>> properties
>> - related to xml document order...
>> The typical query is:
>> //*[@prop1='value1']/jcr:deref(@references,'*')[@prop2='value2' or
>> @prop2='value3']
>> The question is how do I something like that without jcr:deref?
> 
> you could do an initial search for [@prop2='value2' or @prop2='value3']
> and then 
> manually check if one of the referencing nodes has a [@prop1='value1'].
> 
> or you could do it the other way round and search for [@prop1='value1' and 
> @references] and then dereference manually the result nodes and check
> @prop2.
> 
>> How do I configure/disable document order behaviour?
> 
> you have to set the parameter respectDocumentOrder to false in the
> SearchIndex 
> configuration.
> 
>> will it help?
> 
> if respectDocumentOrder is set to false, the result nodes are ordered by
> score.
> 
> regards
>   marcel
> 
> 

-- 
View this message in context: http://www.nabble.com/many-to-many-relations-flexible-hierarchies-references-tf3252566.html#a9158475
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message