AnsweredAssumed Answered

Can't search some custom fields

Question asked by marrivato on Oct 19, 2015
I created a custom model and I was able to successfully create new fields for a node (they all appear when I look at a document's Properties). But, when I try to search for some field of the model (please see below), eg. field "my:cognome" or "my:prod_cognome" (and so on), advanced search shows 0 results found. The strange thing is that if I try to search for other fields of the same model, e.g "my:codicefiscale" or "my:prod_codicefiscale", everything work fine and advanced search shows the right results.

The fields for which the search doesn't work are rightly set and viewable from the Share interface or from nodebrowser (

I scoured the Internet and have tried every thing I can find, I rebuilt Alfresco content store index (index.recovery.mode=FULL) as well, but nothing was change.

Any suggestions would be appreciated!

Here is a sample of my share-config-custom.xml


   <config replace="true">
         <!– Developer debugging setting to turn on DEBUG mode for client scripts
            in the browser –>
         <!– LOGGING can always be toggled at runtime when in DEBUG mode (Ctrl,
            Ctrl, Shift, Shift). This flag automatically activates logging on page load. –>

   <!– ServletException: Possible CSRF attack noted when comparing token in
      session and request header The CSRF filter introduced in Alfresco 4.2 blocks
      some of the web scripts used by the scripts. To avoid this behaviour, it
      must be disabled so relevant scripts can be used –>
   <config evaluator="string-compare" condition="CSRFPolicy" replace="true">
      <filter />

   <config evaluator="string-compare" condition="DocumentLibrary">
         <!– Aspects that a user can see –>
            <aspect name="my:archived" />

         <!– Aspects that a user can add. Same as "visible" if left empty –>

         <!– Aspects that a user can remove. Same as "visible" if left empty –>

         <type name="cm:content">
            <subtype name="my:doc" />


   <!– Advanced Search extension –>
   <config replace="true" evaluator="string-compare" condition="AdvancedSearch">
         <!– Forms for the advanced search type list –>
            <form labelId="search.form.label.bl_doc"
            <form labelId="search.form.label.cm_folder"

   <config evaluator="model-type" condition="my:doc">
         <!– Search form –>
         <form id="search">
               <!– Documento –>
               <show id="my:datachiusura" force="false" />
               <show id="my:iddocumento" force="false" />
               <show id="my:oggettodocumento" force="false" />
               <show id="my:tipodocumento" force="false" />
               <show id="my:utentedocumento" force="false" />
               <!– Soggetto produttore –>
               <show id="my:prod_cognome" force="false" />
               <show id="my:prod_nome" force="false" />
               <show id="my:prod_codicefiscale" force="false" />
               <show id="my:prod_ragionesociale" force="false" />
               <show id="my:prod_partitaiva" force="false" />
               <!– Destinatario –>
               <show id="my:cognome" force="false" />
               <show id="my:nome" force="false" />
               <show id="my:codicefiscale" force="false" />
               <show id="my:ragionesociale" force="false" />
                    <!– Sections –>
                  <set id="doc" appearance="bordered-panel" label-id="search.form.section.document" />
                  <set id="prod" appearance="bordered-panel" label-id="search.form.section.producer" />
                  <set id="dest" appearance="bordered-panel" label-id="search.form.section.consumer" />
                  <!– Fields –>
                    <field id="my:datachiusura" set="doc" label-id="">
                        <control template="/org/alfresco/components/form/controls/daterange.ftl" />
               <field id="my:iddocumento" set="doc" label-id="" />
               <field id="my:oggettodocumento" set="doc" label-id="search.form.section.subjct" />
               <field id="my:tipodocumento" set="doc" label-id="search.form.section.type" />
               <field id="my:utentedocumento" set="doc" label-id="search.form.section.user" />
               <!– Soggetto produttore –>
               <field id="my:prod_codicefiscale" set="prod" label-id="search.form.section.taxcode" />
               <field id="my:prod_partitaiva" set="prod" label-id="search.form.section.vat" />
               <field id="my:prod_ragionesociale" set="prod" label-id="" />
               <field id="my:prod_cognome" set="prod" label-id="search.form.section.surname" />
               <field id="my:prod_nome" set="prod" label-id="" />
               <!– Destinatario –>
               <field id="my:codicefiscale" set="dest" label-id="search.form.section.taxcode" />
               <field id="my:cognome" set="dest" label-id="search.form.section.surname" />
               <field id="my:nome" set="dest" label-id="" />
               <field id="my:ragionesociale" set="dest" label-id="" />


Here is a sample of my model:

<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="my:daxorux" xmlns="">
    <!– Optional meta-data about the model –>
    <description>Test model</description>

    <!– Imports are required to allow references to definitions in other models –>
        <!– Import Alfresco Dictionary Definitions –>
        <import uri="" prefix="d" />
        <!– Import Alfresco Content Domain Model Definitions –>
        <import uri="" prefix="cm" />

    <!– Introduction of new namespaces defined by this model –>
        <namespace uri="" prefix="bl" />

        <!– Enterprise-wide generic document type –>
        <type name="my:doc">
            <title>IT Documento</title>
            <!– Documento –>
            <property name="my:datachiusura">
               <title>Data chiusura documento</title>
            <property name="my:iddocumento">
               <title>ID documento</title>
            <property name="my:oggettodocumento">
               <title>Oggetto documento</title>
            <property name="my:tipodocumento">
               <title>Tipologia documento</title>
            <property name="my:utentedocumento">
               <title>Utente documento</title>
            <!– Soggetto produttore –>
            <property name="my:prod_codicefiscale">
               <title>Codice fiscale produttore</title>
            <property name="my:prod_partitaiva">
               <title>Partita IVA produttore</title>
            <property name="my:prod_ragionesociale">
               <title>Ragione sociale produttore</title>
            <property name="my:prod_cognome">
               <title>Cognome produttore</title>
            <property name="my:prod_nome">
               <title>Nome produttore</title>
            <!– Destinatario –>
            <property name="my:codicefiscale">
               <title>Codice fiscale</title>
            <property name="my:cognome">
            <property name="my:nome">
            <property name="my:ragionesociale">
               <title>Ragione sociale</title>

        <aspect name="my:archived">
            <title>IT archived document</title>
               <property name="my:notarchived">