AnsweredAssumed Answered

Indexation ne fonctionne que sur un champ (custom Model)

Question asked by yanock on Jul 27, 2010
Latest reply on Jul 28, 2010 by yanock
Bonjour,

voila j'utilise un custom model :

facture :

<?xml version="1.0" encoding="UTF-8"?>

    <!– Definition of new Model –>
    <model name="facture:facturemodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
    
      <!– Optional meta-data about the model –>  
      <description>Modele de documents facture</description>
      <author>M. Meignen</author>
      <version>1.0</version>
    
      <!– Imports are required to allow references to definitions in other models –>  
      <imports>
        <!– Import Alfresco Dictionary Definitions –>
        <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
        <!– Import Alfresco Content Domain Model Definitions –>
        <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
      </imports>
    
      <!– Introduction of new namespaces defined by this model –>
      <!– NOTE: The following namespace my.new.model should be changed to reflect your own namespace –>
      <namespaces>
        <namespace uri="facture.new.model" prefix="facture"/>
      </namespaces>
    
      <types>
        <!– Definition of new Content Type: Documents Facture Type 1 –>
        <type name="facture:TypeFacture">
          <title>Facture</title>
          <parent>cm:content</parent>
          <properties>
         <property name="facture:Societe">
          <type>d:text</type>
         </property>
         <property name="facture:Numero de facture">
          <type>d:text</type>
         </property>
         <property name="facture:Type de facture">
          <type>d:text</type>
         </property>
         <property name="facture:Date de facture">
          <type>d:text</type>
         </property>
         <property name="facture:Numero de folio">
          <type>d:text</type>
         </property>
         <property name="facture:Numero de siren">
          <type>d:text</type>
         </property>
         <property name="facture:Numero de TVA">
          <type>d:text</type>
         </property>
         <property name="facture:Numero de commande">
          <type>d:text</type>
         </property>
         <property name="facture:Montant TTC">
          <type>d:text</type>
         </property>
         <property name="facture:Date de creation">
          <type>d:text</type>
         </property>
         <property name="facture:Nom fournisseur">
          <type>d:text</type>
         </property>
          </properties>
        </type>    
      </types>
    </model>



et mon web-client-config-custom.xml :


<alfresco-config>

   <!– Example of overriding the from email address –>
   <!–
   <config>
      <client>
         <from-email-address>someone@your-domain.com</from-email-address>
         <search-max-results>100</search-max-results>
      </client>
   </config>
   –>

   <!– Example of adding languages to the list in the login page –>

   <config evaluator="string-compare" condition="Languages">
      <languages>
         <language locale="fr_FR">French</language>
      </languages>
   </config>

  

      <!– Configuration de l interface entree doc  –>
      <config evaluator="string-compare" condition="Content Wizards">
        <content-types>
          <type name="rh:TypeRH" />
        <type name="societe:TypeSociete" />
        <type name="facture:TypeFacture" />
        </content-types>
      </config>
    
      <!– On rend visible les proprietes –>
      <config evaluator="node-type" condition="rh:TypeRH">
        <property-sheet>
          <show-property name="rh:Dkey" />
          <show-property name="rh:Periode" />
        <show-property name="rh:Matricule" />
        <show-property name="rh:Societe" />
        <show-property name="rh:Etablissement" />
        <show-property name="rh:Uo" />
        <show-property name="rh:Typedoc" />
        <show-property name="rh:Id_lot" />
        <show-property name="rh:Credate" />
        <show-property name="rh:Enregactif" />
        </property-sheet>
      </config>

      <config evaluator="node-type" condition="societe:TypeSociete">
        <property-sheet>
          <show-property name="societe:Dkey" />
          <show-property name="societe:Periode" />
        <show-property name="societe:Societe" />
        <show-property name="societe:Typedoc" />
        <show-property name="societe:Id_lot" />
        <show-property name="societe:Credate" />
        <show-property name="societe:Enregactif" />
        </property-sheet>
      </config>
    
     <config evaluator="node-type" condition="facture:TypeFacture">
        <property-sheet>
          <show-property name="facture:Societe" />
          <show-property name="facture:Numero de facture" />
        <show-property name="facture:Type de facture" />
        <show-property name="facture:Date de facture" />
        <show-property name="facture:Numero de folio" />
        <show-property name="facture:Numero de siren" />
        <show-property name="facture:Numero de TVA" />
        <show-property name="facture:Numero de commande" />
        <show-property name="facture:Montant TTC" />
        <show-property name="facture:Date de creation" />
        <show-property name="facture:Nom fournisseur" />
        </property-sheet>
      </config>


    <!– Rends actif les type dans le wizard "specialise le type –>  
      <config evaluator="string-compare" condition="Action Wizards">
        <specialise-types>
         <type name="rh:TypeRH"/>
         <type name="societe:TypeSociete"/>
         <type name="facture:TypeFacture" />
        </specialise-types>
      </config>

         <!– Example of configuring advanced search –>

         <config evaluator="string-compare" condition="Advanced Search" replace="true">
           <advanced-search>
             <content-types>
               <type name="rh:TypeRH"/>
               <type name="societe:TypeSociete"/>
               <type name="facture:TypeFacture" />
             </content-types>
             <custom-properties>
                <meta-data type="rh:TypeRH" property="rh:Dkey"/>
                <meta-data type="rh:TypeRH" property="rh:Periode" />
                <meta-data type="rh:TypeRH" property="rh:Matricule" />
                <meta-data type="rh:TypeRH" property="rh:Societe" />
                <meta-data type="rh:TypeRH" property="rh:Etablissement" />
                <meta-data type="rh:TypeRH" property="rh:Uo" />
                <meta-data type="rh:TypeRH" property="rh:Typedoc" />
                <meta-data type="rh:TypeRH" property="rh:Id_lot" />
                <meta-data type="rh:TypeRH" property="rh:Credate" />
                <meta-data type="rh:TypeRH" property="rh:Enregactif" />
               
                <meta-data type="facture:TypeFacture" property="facture:Societe"/>
                <meta-data type="facture:TypeFacture" property="facture:Numero de facture"/>
                <meta-data type="facture:TypeFacture" property="facture:Type de facture"/>
             </custom-properties>
           </advanced-search>
         </config>
</alfresco-config>



Je peux ajouter des documents avec ce model et les autres que j'ai créé mais lorsque je fais une recherche, il n'y a que pour facture:Societe que cela fonctionne. J'ai relancer mon serveur en indexation full mais rien n'y fait. Avez vous une idée car vraiment la je sèche.

Avouez que c'est dommage d'avoir plein de méta données et de ne pas pouvoir faire de recherche dessus.

Outcomes