cancel
Showing results for 
Search instead for 
Did you mean: 

search for properies defined not working

bisana
Champ on-the-rise
Champ on-the-rise
Hi
After adding Document Type and its properties, I have  checked in documents, I have edited the properties save it
and I have done the necessary changes as per the document "http://ecmarchitect.com/images/articles/alfresco-content/content-article-2ed.pdf"
for search display.
Now when I go for advanced search, I can  select the document type, upon selecting the document type I can see my custom properties in search options, but all the fields I search for give empty result, expect for checkbox.
How could it is working only for checkbox in this case.
Has any one come across such experience
What  possible mistake I could have done, I have cross checked the document with my settings and all are correct

  
<!– lg:doc type (new nodes) –>
<config evaluator="model-type" condition="lg:doc">
<forms>

<!– Search form –>
<form id="search">
<field-visibility>
<show id="cm:name" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
<show id="mimetype" />
<show id="cm:modified" />
<show id="cm:modifier" />
<!– sc:productRelated –>
<show id="lg:nameofparty" />
<show id="lg:nameofotherparty" />
<show id="lg:project" />
<show id="lg:purpose" />
<show id="lg:effectivedate" />
<show id="lg:expirydate" />
<show id="lg:governinglaw" />
<show id="lg:orgin" />
<show id="lg:category " />
<show id="lg:lsrno" />
</field-visibility>

<appearance>
<field id="mimetype">
<control
template="/org/alfresco/components/form/controls/mimetype.ftl" />
</field>
<field id="cm:modifier">
<control>
<control-param name="forceEditable">true</control-param>
</control>
</field>
<field id="cm:modified">
<control
template="/org/alfresco/components/form/controls/daterange.ftl" />
</field>

   <field id="lg:nameofparty" label-id="assoc.lg_nameofparty">
          <control template="/org/alfresco/components/form/controls/textfield.ftl" />
       </field>
       <field id="lg:nameofotherparty" label-id="assoc.lg_nameofotherparty">
          <control template="/org/alfresco/components/form/controls/textfield.ftl" />
       </field>
        <field id="lg:project" label-id="assoc.lg_project">
          <control template="/org/alfresco/components/form/controls/textfield.ftl" />
       </field>
       <field id="lg:purpose" label-id="assoc.lg_purpose">
          <control template="/org/alfresco/components/form/controls/textfield.ftl" />
       </field>
      
       <field id="lg:effectivedate" label-id="assoc.lg_effectivedate">
           <control template="/org/alfresco/components/form/controls/daterange.ftl" />
       </field>
       <field id="lg:expirydate" label-id="assoc.lg_expirydate">
           <control template="/org/alfresco/components/form/controls/daterange.ftl" />
       </field>

        <field id="lg:governinglaw" label-id="assoc.lg_governinglaw">
          <control template="/org/alfresco/components/form/controls/textfield.ftl" />
       </field>
       
 
       <field id="lg:orgin" label-id="assoc.lg_orgin">
          <control template="/org/alfresco/components/form/controls/textfield.ftl" />
       </field>
       <field id="lg:category" label-id="assoc.lg_category">
          <control template="/org/alfresco/components/form/controls/textfield.ftl" />
       </field>
       <field id="lg:lsrno" label-id="assoc.lg_lsrno">
          <control template="/org/alfresco/components/form/controls/textfield.ftl" />
       </field>
     </appearance>



my  "xxxModel.xml" and "xxx-model-context.xml" are correct, since I have been checking it

Guidance requested
Thanks
Joseph John
4 REPLIES 4

mitpatoliya
Star Collaborator
Star Collaborator
Even for the OOTB properties also result is same?
Also be sure you have selected the correct option from "repository" and "sites".
These options are above document type in the search page.

bisana
Champ on-the-rise
Champ on-the-rise
Thanks Mit
OOTB properties , If I am correct, by OOTB you mean  values like Name, Title description works for folders, and contents are working fine
I have uploaded am screen shot of my Advance Search Option , select option between folders,contents and the type I created at
http://oss101.com/dm/SearchOption.png
there was no option to select repository or site, when I check advance search option
Did cross check of my configuration files, n no of time, was not able to see any problem, it is all identical to the examples I read from the documentation
Got stuck over here and do not know how to proceed
Thanks
Joseph John

jmuras
Champ in-the-making
Champ in-the-making
Hi Joseph,

Does actually search for legal deparment NDA type shows anything at all? If not maybe try to remove extra fields and try then. If it works then try to figure out with which field there is a problem. If does not work then make sure that documents you search for are of legal deparment NDA type.

How actually have you defined new type. Can you paste lg:doc model definition? Can you also paste configuration of new type to be search for in share config file?

bisana
Champ on-the-rise
Champ on-the-rise
Hi Joanna, Mits
   Thanks for the reply.
I was able to solve it, I did it from again, this time for simplicity I kept only one Type with two text fields, just now finished uploaded a document, changed the type, then edited the DocumentType Properties ,saved it.
Used advanced search, select the Document Type and searched the fields and I got the result.
I am posting my code over here for any future reference
Thanks
Joseph John
my share-config-custom.xml is

<alfresco-config>
<!– Document Library config section –>
<config evaluator="string-compare" condition="DocumentLibrary">
 
  <types>
<type name="cm:content">
<subtype name="lg:doc" />
<subtype name="lg:whitepaper" />
</type>

</types>
</config>


   <!– cm:content type (existing nodes) –>
   <config evaluator="node-type" condition="lg:doc">
      <forms>
         <!– Default form configuration for the cm:content type –>
         <form>
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="mimetype" />
               <show id="cm:author" force="true" />
               <show id="size" for-mode="view" />
               <show id="cm:creator" for-mode="view" />
               <show id="cm:created" for-mode="view" />
               <show id="cm:modifier" for-mode="view" />
               <show id="cm:modified" for-mode="view" />
              
               <!– tags and categories –>
               <show id="cm:taggable" for-mode="edit" force="true" />
               <show id="cm:categories" />
              
               <!– cm:dublincore aspect –>
               <show id="cm:publisher"/>
               <show id="cm:contributor"/>
               <show id="cm:type"/>
               <show id="cm:identifier"/>
               <show id="cm:dcsource"/>
               <show id="cm:coverage"/>
               <show id="cm:rights"/>
               <show id="cm:subject"/>
              
               <!– cm:complianceable aspect –>
               <show id="cm:removeAfter" />
              
               <!– cm:effectivity aspect –>
               <show id="cm:from"/>
               <show id="cm:to"/>
              
               <!–  cm:summarizable aspect –>
               <show id="cm:summary" />
              
               <!– cm:translatable aspect –>
               <show id="cm:translations" />
              
               <!– cm:localizable aspect –>
               <show id="cm:locale" />
              
               <!– cm:ownable aspect –>
               <show id="cm:owner" />
              
               <!– cm:attachable aspect –>
               <show id="cm:attachments" />
              
               <!– cm:emailed aspect –>
               <show id="cm:originator" />
               <show id="cm:addressee" />
               <show id="cm:addressees" />
               <show id="cm:sentdate" />
               <show id="cm:subjectline" />
              
               <!– exif:exif aspect –>
               <show id="exif:dateTimeOriginal" />
               <show id="exif:pixelXDimension" />
               <show id="exif:pixelYDimension" />
               <show id="exif:exposureTime" />
               <show id="exif:fNumber" />
               <show id="exif:flash" />
               <show id="exif:focalLength" />
               <show id="exif:isoSpeedRatings" />
               <show id="exif:manufacturer" />
               <show id="exif:model" />
               <show id="exif:software" />
               <show id="exif:orientation" />
               <show id="exif:xResolution" />
               <show id="exif:yResolution" />
               <show id="exif:resolutionUnit" />

               <!– audio:audio aspect –>
               <show id="audio:album" />
               <show id="audio:artist" />
               <show id="audio:composer" />
               <show id="audio:engineer" />
               <show id="audio:genre" />
               <show id="audio:trackNumber" />
               <show id="audio:releaseDate" />
               <show id="audio:sampleRate" />
               <show id="audio:sampleType" />
               <show id="audio:channelType" />
               <show id="audio:compressor" />
              
               <!– cm:indexControl aspect –>
               <show id="cm:isIndexed" />
               <show id="cm:isContentIndexed" />
              
               <!– cm:geographic aspect –>
               <show id="cm:latitude" />
               <show id="cm:longitude" />
         
               <!– lg:doc –>
          <show id="lg:nameofparty"/>
          <show id="lg:nameofotherparty"/>

      
            </field-visibility>
            <appearance>
               <field id="cm:name">
                 <control>
                    <control-param name="maxLength">255</control-param>
                 </control>
               </field>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:description">
                  <control>
                     <control-param name="activateLinks">true</control-param>
                  </control>
               </field>
               <field id="mimetype">
                  <control template="/org/alfresco/components/form/controls/mimetype.ftl" />
               </field>
               <field id="size">
                  <control template="/org/alfresco/components/form/controls/size.ftl" />
               </field>
               <field id="cm:taggable">
                  <control>
                     <control-param name="compactMode">true</control-param>
                     <control-param name="params">aspect=cm:taggable</control-param>
                     <control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
                     <control-param name="createNewItemIcon">tag</control-param>
                  </control>
               </field>
               <field id="cm:categories">
                  <control>
                     <control-param name="compactMode">true</control-param>
                  </control>
               </field>
               <field id="cm:originator" read-only="true" />
               <field id="cm:addressee" read-only="true" />
               <field id="cm:addressees" read-only="true" />
               <field id="cm:sentdate" read-only="true" />
               <field id="cm:subjectline" read-only="true" />
          <field id="lg:nameofparty" label-id="assoc.lg_nameofparty" />
          <field id="lg:nameofotherparty" label-id="assoc.lg_nameofotherparty" />
            </appearance>
         </form>

         <!– Document Library pop-up Edit Metadata form –>
         <form id="doclib-simple-metadata">
     
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <!– tags and categories –>
               <show id="cm:taggable" for-mode="edit" force="true" />
               <show id="cm:categories" />
            </field-visibility>
            <edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl" />
            <appearance>
               <field id="cm:name">
                 <control>
                    <control-param name="maxLength">255</control-param>
                 </control>
               </field>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:description">
                  <control>
                     <control-param name="activateLinks">true</control-param>
                  </control>
               </field>
               <field id="cm:taggable">
                  <control>
                     <control-param name="compactMode">true</control-param>
                     <control-param name="params">aspect=cm:taggable</control-param>
                     <control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
                     <control-param name="createNewItemIcon">tag</control-param>
                  </control>
               </field>
               <field id="cm:categories">
                  <control>
                     <control-param name="compactMode">true</control-param>
                  </control>
               </field>
            </appearance>
         </form>
        
         <!– Document Library Inline Edit form –>
         <form id="doclib-inline-edit">
            <field-visibility>
               <show id="cm:name" />
               <show id="cm:title" force="true" />
               <show id="cm:description" force="true" />
               <show id="cm:content" force="true" />
            </field-visibility>
            <appearance>
               <field id="cm:name">
                 <control>
                    <control-param name="maxLength">255</control-param>
                 </control>
               </field>
               <field id="cm:title">
                  <control template="/org/alfresco/components/form/controls/textfield.ftl" />
               </field>
               <field id="cm:content">
                  <control>
                     <control-param name="editorAppearance">explorer</control-param>
                     <control-param name="forceEditor">true</control-param>
                  </control>
               </field>
            </appearance>
         </form>
      </forms>
     

     
     
     
     
      </config>
  

<config replace="true" evaluator="string-compare" condition="AdvancedSearch">
<advanced-search>
<!– Forms for the advanced search type list –>
<forms>
<form labelId="search.form.label.cm_content" descriptionId="search.form.desc.cm_content">cm:content</form>
<form labelId="search.form.label.cm_folder"  descriptionId="search.form.desc.cm_folder">cm:folder</form>
<form labelId="type.log_doc" descriptionId="search.form.desc.lg_doc">lg:doc</form>
</forms>
</advanced-search>

</config>



   <!– sc:whitepaper type (new nodes) –>
<config evaluator="model-type" condition="lg:doc">
  <forms>
    <!– Search form –>
<form id="search">
<field-visibility>
<show id="cm:name" />
<show id="cm:title" force="true" />
<show id="cm:description" force="true" />
<show id="mimetype" />
<show id="cm:modified" />
<show id="cm:modifier" />
<!– sc:productRelated –>
<show id="lg:nameofparty" />
<show id="lg:nameofotherparty" />
<!– sc:webable
<show id="sc:isActive" />
<show id="sc:published" />
–>
</field-visibility>
<appearance>
<field id="mimetype">
<control template="/org/alfresco/components/form/controls/mimetype.ftl" />
</field>
<field id="cm:modifier">
<control>
<control-param name="forceEditable">true</control-param>
</control>
</field>
<field id="cm:modified">
<control template="/org/alfresco/components/form/controls/daterange.ftl" />
</field>
<!– sc:productRelated –>
<field id="lg:nameofparty" label-id="prop.lg_nameofparty">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<field id="lg:nameofotherparty" label-id="prop.lg_nameofotherparty">
<control template="/org/alfresco/components/form/controls/textfield.ftl" />
</field>
<!– sc:webable –>
<field id="sc:isActive" label-id="prop.sc_isActive">
<control template="/org/alfresco/components/form/controls/checkbox.ftl" />
</field>
<field id="sc:published" label-id="prop.sc_published">
<control template="/org/alfresco/components/form/controls/daterange.ftl" />
</field>
</appearance>
</form>
</forms>
</config>
</alfresco-config>