cancel
Showing results for 
Search instead for 
Did you mean: 

I am using Alfresco community Versio V5.1.0 (r127059-b7), Can you please let me know how can customise the default serach , like i want to serach with the document properties in the search box

dileep22
Champ in-the-making
Champ in-the-making

Hi ,

I am using alfresco community version V5.1.0 (r127059-b7).

I want to customize the default search, i,e: want to search with the document properties.

Please help.

12 REPLIES 12

kalpesh_c2
Star Collaborator
Star Collaborator

Hi Dileep,

If you just want to add custom properties or add more properties in search, follow below steps :

1. Locate "alfresco-share-services-5.1.f" jar located at  tomcat/webapps/alfresco/WEB-INF/lib

2. Copy search.get.config.xml at path alfresco\templates\webscripts\org\alfresco\slingshot\search and place it in extension\templates\webscripts\org\alfresco\slingshot\search

3. Edit search.get.config.xml file and add your custom properties to <default-query-template> tag

<search>
<default-operator>AND</default-operator>
<default-query-template>%(cm:name cm:title cm:description ia:whatEvent ia:descriptionEvent lnk:title lnk:description TEXT TAG)</default-query-template>
</search>

You can get detailed understanding on how this works at search custom properties?  

Let me know if this is not what you are searching for.

Thanks,

Kalpesh

ContCentric

dileep22
Champ in-the-making
Champ in-the-making

HI Kalpesh,

Thanks for your reply, but i can't find the path you specified can you please mention the exact path or should i create those paths ,.

alfresco\templates\webscripts\org\alfresco\slingshot\search

extension\templates\webscripts\org\alfresco\slingshot\search

Thanks & Regards

Dileep

dileep22
Champ in-the-making
Champ in-the-making

Hi Kalpesh,

sorry , the source path i found and got that file search.get.config.xml.

The path that file to place i could not able to find  (extension\templates\webscripts\org\alfresco\slingshot\search) can you please mention the exact path , or should i create this path ?

Thanks & Regards

Dileep. O

Hi Dileep,

For any customization/extension in Alfresco, your changes should be in <<ALFRESCO_HOME>>\tomcat\shared\classes\alfresco\extension for repo customization and <<ALFRESCO_HOME>>\tomcat\shared\classes\alfresco\web-extension for share customization. Alfresco will read customization as long as it is available in classpath. This mean, these path could be available in your jar files located in your lib folders.

So, exact path for your case will be <<ALFRESCO_HOME>>\tomcat\shared\classes\alfresco\extension\templates\webscripts\org\alfresco\slingshot\search\search.get.config.xml

Thanks,

Kalpesh

ContCentric

dileep22
Champ in-the-making
Champ in-the-making

Hi Kalpesh,

Thanks for your reply.

The path you specified <<ALFRESCO_HOME>>\tomcat\shared\classes\alfresco\extension\templates\webscripts\org\alfresco\slingshot\search not found in my system.

Till  <<ALFRESCO_HOME>>\tomcat\shared\classes\alfresco\extension path is available.

Can i created the path and put that file in that path.

Thanks & Regarsd

Dileep. O

Yes Dileep, you can create and place file under that folder.

Thanks,

Kalpesh

ContCentric

dileep22
Champ in-the-making
Champ in-the-making

Hi Kalpesh,

I done that but it is not working.

Below is my search.get.config.xml file configuration

 <search>

      <default-operator>AND</default-operator>

      <default-query-template>%
      (cm:name cm:title cm:description cm:content my:authorisedBy CPSmiley Tongueatient_Name
      ia:whatEvent ia:descriptionEvent lnk:title
      lnk:description TEXT  TAG)
      </default-query-template>

      </search>

When i search CPSmiley Tongueatient_Name:Chandrika in the search box,  i am getting the result, but when i search only with the patient name  (Chandrika) search returns nothing.  Please help me.

Thanks & Regards

Dileep. O

Hi Dileep,

For live search, you will have to follow the same instructions for live-search-docs.get.config.xml file.

So, copy 

1. Locate "alfresco-share-services-5.1.f" jar located at  tomcat/webapps/alfresco/WEB-INF/lib

2. Copy live-search-docs.get.config.xml at path alfresco\templates\webscripts\org\alfresco\slingshot\search and place it in extension\templates\webscripts\org\alfresco\slingshot\search

3. Edit <<ALFRESCO_HOME>>\tomcat\shared\classes\alfresco\extension\templates\webscripts\org\alfresco\slingshot\search\live-search-docs.get.config.xml file and add your custom properties to <default-query-template> tag

<search>
<default-operator>AND</default-operator>
<default-query-template>%(cm:name cm:title cm:description TEXT TAG)</default-query-template>
</search>

4. Restart Alfresco

Let me know if this works with you.

Thanks,

Kalpesh

ContCentric

dileep22
Champ in-the-making
Champ in-the-making

Hi Kalpesh,

I have done the above, but not working. Below is my live-search-docs.get.config.xml file configuration , please check this once .

<search>

   <default-operator>AND</default-operator>

   <default-query-template>%
   (cm:name cm:title cm:description my:authorisedBy CPSmiley Tongueatient_Name TEXT TAG)
   </default-query-template>

</search>

Thanks & Regards

Dileep. O

Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.