cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene query on multiple values property?

nenad982
Champ on-the-rise
Champ on-the-rise
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 'xyzSmiley Tonguerop2' 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…
3 REPLIES 3

abarisone
Star Contributor
Star Contributor

sanket
Champ on-the-rise
Champ on-the-rise

nenad982
Champ on-the-rise
Champ on-the-rise
Thank you for your answers, but those references I saw already and I didn't have enough luck/knowledge to create valid query.

So it would be helpful for me if you can give some query example based on sample type and constraint that I provided.

Thanks a lot…