jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: many to many relations/flexible hierarchies/references
Date Tue, 20 Feb 2007 08:12:50 GMT
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

Mime
View raw message