Hi guys,

I have documents in the repository with a multi-value, comma-seperated 
property. I've created a DASL to find N results, where at least one value in 
the multi-value property matches a list of values. The results need to be 
sorted by the priority of the value. A simple example:

This is my value list for the query: B, A, C, D
I have three documents: 1 (properties: A & C), 2 (properties: B & D), 3 
(properties: A & D)
Expected sorting: 2, 1, 3

My initial idea was to use strict-property-contains as a boolean sorter (if 
true, the result goes on top):

<d:orderby>
    <d:order>
        <S:strict-property-contains>
            <d:prop>
                <hc:multiValueProperty/>
            </d:prop>
            <d:literal>B</d:literal>
        </S:strict-property-contains>
    </d:order>
    <d:order>
        <S:strict-property-contains>
            <d:prop>
                <hc:multiValueProperty/>
            </d:prop>
            <d:literal>A</d:literal>
        </S:strict-property-contains>
    </d:order>
    ...
</d:orderby>

Unfortunately, this seems to be illegal. Is there another way to do this the 
proper way (in one query)?

Regards,

Wouter Zelle

<<winmail.dat>>

********************************************
Hippocms-dev: Hippo CMS development public mailinglist

Reply via email to