AnsweredAssumed Answered

Lucene query on multiple values property?

Question asked by nenad982 on Mar 25, 2014
Latest reply on Mar 26, 2014 by nenad982
Hi all,

I would like to create lucene query that will return me all the nodes of specific type that has specific value for some multivalued property. So for example:

Custom type:


<type name="xyz:cutsomType">
    <title>Type title</title>
    <parent>cm:content</parent>
    <properties>
   <property name="xyz:prop1">
      <type>d:text</type>
      <mandatory>false</mandatory>
      <multiple>false</multiple>
   </property>
   <property name="xyz:prop2">
      <type>d:text</type>
      <mandatory>false</mandatory>
      <multiple>false</multiple>
      <constraints>
         <constraint ref="xyz:constraint1" />
      </constraints>
   </property>
    </properties>
</type>


Constraint:

<constraint name="xyz:constraint1" type="LIST">
    <parameter name="allowedValues">
   <list>
       <value></value>
       <value>AB XYZ</value>
       <value>CD IJK</value>
       <value>EF OPQ</value>
   </list>
    </parameter>
</constraint>

So I would like to find all nodes of type 'xyz:cutsomType' which have 'CD IJK' as one of the values for 'xyz:prop2' property?

I used fts-alfresco and I wrote this query:


TYPE: "xyz:cutsomType" AND xyz:prop2: "CD IJK"


but this does not works as expected.

Does somebody know how to write this query?

Thanks a lot…

Outcomes