AnsweredAssumed Answered

Search custom properties of a custom aspect (Simple Search)

Question asked by biersen on Mar 5, 2010
Latest reply on Oct 10, 2012 by supalucas
Hi all,

How can I search (on simple search) for custom properties of a custom aspect? I tried this:

mymodel.xml

<namespaces>
   <namespace uri="http://www.myapp.com/model/content/1.0" prefix="myprefix" />
</namespaces>

<types>
   <type name="myprefix:mytype">
      <title>My Type</title>
      <parent>myprefix:mygenerictype</parent>
   <property name="myprefix:mytypeproperty">
         <title>TypeProperty</title>
         <type>d:text</type>
         <protected>false</protected>
         <mandatory>false</mandatory>
         <multiple>false</multiple>
         <index enabled="true">
                        <atomic>false</atomic>
                        <stored>false</stored>
                        <tokenised>true</tokenised>
                     </index>
      </property>
      <mandatory-aspects>
         <aspect>myprefix:myaspect</aspect>            
      </mandatory-aspects>
   </type>
</types>

<aspects>
   <aspect name="myprefix:myaspect">
      <title>My Aspect</title>
      <properties>
         <property name="myprefix:myaspectproperty">
            <title>AspectProperty</title>
            <type>d:text</type>
            <protected>false</protected>
            <mandatory>false</mandatory>
            <multiple>false</multiple>
            <index enabled="true">
                           <atomic>false</atomic>
                           <stored>false</stored>
                           <tokenised>true</tokenised>
                        </index>
         </property>
      </properties>
   </aspect>
</aspects>


web-client-config-custom.xml

<config>
      <client>
         <simple-search-additional-attributes>
            <qname>{http://www.myapp.com/model/content/1.0}mytypeproperty</qname>
                <qname>{http://www.myapp.com/model/content/1.0}myaspectproperty</qname>
                <qname>{http://www.alfresco.org/model/content/1.0}description</qname>
                <qname>{http://www.alfresco.org/model/content/1.0}title</qname>
                <qname>{http://www.alfresco.org/model/content/1.0}author</qname>
         </simple-search-additional-attributes>
      </client>
   </config>

So, when I search (simple search) for title, description and mytypeproperty, the search is ok and I get correct results. But, when I try search for myaspectproperty, the search not work. I tried add  <qname>{http://www.myapp.com/model/content/1.0}myaspect</qname> but I've the same problem.
It is possible to search for custom properties of custom aspects? What i'm doing wrong?
Thank you!


biesen

Outcomes