cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Share Search in Metadata

joaotpd
Champ on-the-rise
Champ on-the-rise
Hi all!

I'm using Alfresco Share 3.2r2… I develop a new Content Model for working with new types of content. The new types have new properties.

Example:
New type: test_type;
New property: test_property.
<type name="my:test_type">
   <properties>
      <property name="my:test_property">
         <title>Title</title>
         <type>d:text</type>
         <mandatory>false</mandatory>
      </property>
   …
I managed to configure Alfresco Share in a way that I can view and edit that new properties (http://edlovesjava.blogspot.com/2009/07/alfresco-forms-engine-customization.html).

After editing and save the new metadata, for a document that i chose to have "test_type", I perform a search for the new submited text. Say that I enter the text "alfresco test property" in test_property…
And nothing happens (search this site/search all sites)… The search returns 0 documents!!
Is this normal?!Is there a way to easily configure this search?!
Thanks a lot!!

João
22 REPLIES 22

cmarguello
Champ in-the-making
Champ in-the-making
I note that simple search needs double quote!!!!

If i search
0000003.tif
It doesnt work.

But if search 
"0000003.tif"
It works!!!!!!

If i search
0000003*
works too!!!

why this happend????
How can we solve this?

Thanks again.
Cristian

cmarguello
Champ in-the-making
Champ in-the-making
I found
http://wiki.alfresco.com/wiki/Share_Repository_Search_Improvements

So, i can search by properties or simply ALL putting in keywords…
ALL:26630006

How can i configure that default search where ALL:keywords???


Thanks

cmarguello
Champ in-the-making
Champ in-the-making
To do the search in all content i do:
First: in webapps/share/WEB-INF/classes/alfresco/site-web-scripts/org/alfresco/components/search/search.get.html.ftl
In the Alfresco.Search, i add ALL: when have something in search term.

   initialSearchTerm: ("${searchTerm?js_string}".length>0?"ALL:":"")+"${searchTerm?js_string}",

And in the js i remove the string ALL:
webapps/share/component/search/search.js (and the min)


   queryInput.value = this.options.initialSearchTerm;
   if(queryInput.value.length>4){
      queryInput.value = queryInput.value.substring(4);
   }

This is what i need.

Thanks