AnsweredAssumed Answered

Search content with associations

Question asked by cybermakoki on Dec 22, 2009
Good morning all :)

I'm trying to search content with associated documents. I want to use a lucene search but i don't know how, right now i've done the following query:

var query = "TYPE:\"dm:note\" AND ASSOCTYPEQNAME :\"{extension.dom}associatedDoc\"";

My content model looks like this:

DomModel.xml:

<type name="dm:note">
       <title>Note</title>
       <parent>cm:content</parent>
       <properties>
         <property name="dm:type">
           <title>Type</title>
           <type>d:text</type>
         </property>        
       </properties>
       <associations>
         <association name="dm:associatedDoc">
           <title>Document</title>
         <source>
            <mandatory>false</mandatory>
          <many>true</many>
         </source>
           <target>
              <class>cm:content</class>
              <mandatory>false</mandatory>
              <many>true</many>
           </target>
         </association>     
       </associations>
     </type>

I want to get content only if it has associated documents…

any idea?

Outcomes