11-11-2016 03:15 AM
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.
11-14-2016 03:58 AM
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
11-14-2016 04:50 AM
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
11-14-2016 04:56 AM
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
11-14-2016 05:06 AM
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
11-14-2016 05:50 AM
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
11-14-2016 07:16 AM
11-14-2016 07:31 AM
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 CPatient_Name
ia:whatEvent ia:descriptionEvent lnk:title
lnk:description TEXT TAG)
</default-query-template>
</search>
When i search CPatient_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
11-14-2016 12:20 PM
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
11-15-2016 12:39 AM
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 CPatient_Name TEXT TAG)
</default-query-template>
</search>
Thanks & Regards
Dileep. O
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.