AnsweredAssumed Answered

Pesquisar properties de um aspect (Simple Search)

Question asked by biersen on Mar 5, 2010
Latest reply on Apr 29, 2010 by rmonteiro
Bom dia,

É possivel indexar propriedades de um aspect e através da pesquisa simples do Alfresco, pesquisarmos sobre essas propriedades? Eu tentei o seguinte:

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>

Quando tento pesquisar pelo title, description and mytypeproperty, a pesquisa funciona e obtenho os resultados esperados. No entanto, quando tento pesquisar pela propriedade do meu aspect (myaspectproperty), a pesquisa não funciona. Também tentei adicionar {http://www.myapp.com/model/content/1.0}myaspect mas o problema manteve-se.
É possível indexar propriedades de aspects à pesquisa simples? Como posso fazê-lo?
Obrigado


biersen

Outcomes