AnsweredAssumed Answered

ANY qualifier with multivalue fields.

Question asked by kbryd on Mar 26, 2012
Latest reply on Apr 10, 2012 by andy
Hi

Seems like queries with ANY qualifier on multivalue fields don't work as expected.

According to http://wiki.alfresco.com/wiki/CMIS_Query_Language#quantified_in_predicate it should work…

For example, I have a type, defined like this:
               <type name="test:document">
                        <title>Document</title>
                        <parent>cm:content</parent>
                                 <property name="test:keywords">
                                        <title>Keywords</title>
                                        <type>d:text</type>
                                        <mandatory>true</mandatory>
                                        <multiple>true</multiple>
                                        <index enabled="true">
                                                <tokenised>both</tokenised>
                                        </index>
                                </property>
              </type>

Then, I have created an object, so the test:keywords is initialized with three values: one, two, three.

When I query the repository using:

SELECT cmis:name, test:keywords FROM test:document WHERE ANY test:keywords in ('one')

then I get one result, as expected.

When I query for:

SELECT cmis:name, test:keywords FROM test:document WHERE ANY test:keywords in ('two')

I get nothing.

And finally, when I query

SELECT cmis:name, test:keywords FROM test:document WHERE ANY test:keywords in ('two', 'one')

I am getting one row again.

It looks like the engine doesn't check for other values, only the first value is taken into account.

Can someone confirm it? I am using Alfresco Community 4.0.d.

Karol

Outcomes