cancel
Showing results for 
Search instead for 
Did you mean: 

Search custom attributes.

invantix
Champ in-the-making
Champ in-the-making
I was able to configure a custom aspect with several properties.  I added this aspect to a incoming rule on some spaces and everything works fine.  The properties appear ready to be filled in.

The reason I added these properties is so users can search for them.  For example there is a skid number attribute which can contain one or more skid numbers. 

Simple search does not look at any custom property.  It would be nice if it did. After all, we add them because we feel they are important attributes.

I followed the WIKI to add the properties to advanced search. They appear in the "Additional Options" panel but it uses an exact search.  I can get it to work if I surround the skid number with asterisks like *SK102541* but that is an additional thing to teach people.  It would be nice it the search on an attribute was “contains” instead of “exact”

It would be great if we could configure simple search to include searching of all custom attributes.  Including custom attributes in simple search seems like an important feature that would greatly increase the usability of this product.

Does anyone agree or disagree?  What needs to happen to change this?

Regards
8 REPLIES 8

kevinr
Star Contributor
Star Contributor
It would be great if we could configure simple search to include searching of all custom attributes.  Including custom attributes in simple search seems like an important feature that would greatly increase the usability of this product.

Yes. This feature was contributed a few months back, it has been added to Alfresco 2.1 and will be available in that release.

Thanks,

Kevin

jdbrown
Champ in-the-making
Champ in-the-making
Had to do a bit of looking to find how this worked in 2.1, so here it is. 

In your web-client-config-custom.xml you indicate the properties you want the simple search to include.

Example that adds 3 properties to the simple search (1 is a custom property):
   
<config>
      <client>
         <search-max-results>100</search-max-results>
         <simple-search-additional-attributes>
            <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.mycompany.com/model/content/1.0}employeeNumber
            </qname>                        
         </simple-search-additional-attributes>
      </client>
   </config>

maina
Champ in-the-making
Champ in-the-making
Hi all,

I'm not understand how can I access to my custom aspect for use the simple search feature.

I have tested the example and with "description" and "title" all works fine, but when I search for my cutom aspect any result was found.

This is my simple-search-additional-attributes block in web-client-config-custom.xml:

<config>
     <client>
   <search-max-results>100</search-max-results>
   <simple-search-additional-attributes>      <qname>{http://www.alfresco.org/model/content/1.0}description</qname>
<qname>{http://www.alfresco.org/model/content/1.0}title</qname>      
<qname>{??????????????????????????}CodiceFiscale</qname>                       
   </simple-search-additional-attributes>
     </client>
</config>

And this is my custom aspect:

<!– Introduction of new namespaces defined by this model –>
<!– NOTE: The following namespace custom.model should be changed to reflect your own namespace –>
<namespaces>
   <namespace uri="custom.model" prefix="custom"/>
</namespaces>

<aspect name="customSmiley Very Happyata">
   <title>Data</title>
   <properties>            
      <property name="custom:CodiceFiscale">
         <title>Codice Fiscale</title>
         <type>d:text</type>
      </property>
   </properties>   
</aspect>

I think the problem is in the qname property.
How do I have to reference my custom:CodiceFiscale?

<qname>{http://www.alfresco.org/model/content/1.0}CodiceFiscale</qname>
or
<qname>{http://www.alfresco.org/model/content/1.0}custom:CodiceFiscale</qname>
or
<qname>{http://www.mycompany.org/model/content/1.0}CodiceFiscale</qname>


Many Thanks for your help.

Andrea
Italy

jdbrown
Champ in-the-making
Champ in-the-making
The qname "qualified name" requires the fully qualified name for the property where the namespace is within those brackets {}.  So, based on what you show as the namespace URI for your aspect:

<namespaces>
   <namespace uri="custom.model" prefix="custom"/>
</namespaces>

Your qname would be:
<qname>{custom.model}CodiceFiscale</qname> 

orion
Champ in-the-making
Champ in-the-making
Good day,

I create a new Content Type (custom:techspc) with one field (custom:signer). Works fine.

I need to make simple searc over the field custom:signer, I try to configure with:

<config>
   <client>
      <search-max-results>300</search-max-results>
      <simple-search-additional-attributes>
         <qname>{custom:techspc}custom:signer</qname>
      </simple-search-additional-attributes>
   </client>
</config>

But does not work.

Any idea will be appreciated… Smiley Very Happy

jdbrown
Champ in-the-making
Champ in-the-making
Try:
<qname>{custom:techspc}signer</qname> 

darko_narandzic
Champ in-the-making
Champ in-the-making
I checked: when using custom content type, it's:

<qname>{custom.model}customAttributeName</qname>

killinchi
Champ in-the-making
Champ in-the-making
Hello all,

When using simple search in version 2.9.0B it seems that it wont work unless the property name is one word

This is how they are defined in my web-client-config.xml file and the naming convention follows in the model.

<show-property name="invoiceSmiley Tongueerson Number"/>
     <show-property name="invoiceSmiley Tongueerson Name"/>

here is the example of my simple search

 
   <config>
      <client>
         <search-max-results>100</search-max-results>
         <simple-search-additional-attributes>
            <qname>
               {dha.invoice}Person Name
            </qname>
            <qname>
               {dha.invoice}Person Number
            </qname>                       
         </simple-search-additional-attributes>
      </client>
   </config>


Is this a known issue? Is there any way to remedy this?