Search is not working

cancel
Showing results for 
Search instead for 
Did you mean: 
yuva
Active Member

Search is not working

For simple search in the right corner of share page. I have added properties to search,but its not working.

I have created a bean like

web-client-application-context.xml :

<bean id='webClientConfigSource' class='org.alfresco.config.source.UrlConfigSource'>
<constructor-arg>
<list>
<value>classpath:alfresco/extension/web-client-config-custom.xml</value>
</list>
</constructor-arg>
</bean>

in  : workspace\alfmodule\repo\target\repo-1.0-SNAPSHOT\WEB-INF\classes\alfresco\web-client-application-context.xml 

and created a file named web-client-config-custom.xml in : workspace\alfmodule\alfmodule-repo-amp\src\main\amp\config\alfresco\extension\web-client-config-custom.xml 

and i added the config as

web-client-config-custom.xml  :

<alfresco-config>

<config>
<client>
<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}publishedDate</qname>
<qname>{http://www.mycompany.com/model/content/1.0}authorisedBy</qname>
<qname>{http://www.mycompany.com/model/content/1.0}signoff</qname>
<qname>{http://www.mycompany.com/model/content/1.0}processSteps</qname>
<qname>{http://www.mycompany.com/model/content/1.0}contractCopies</qname>
<qname>{http://www.mycompany.com/model/content/1.0}contractTypeOnCC</qname>
<qname>{http://www.mycompany.com/model/content/1.0}contractNumberOnCC</qname>
<qname>{http://www.mycompany.com/model/content/1.0}clientNameOnCC</qname>
<qname>{http://www.mycompany.com/model/content/1.0}contractStartOnCC</qname>
<qname>{http://www.mycompany.com/model/content/1.0}contractEndOnCC</qname>
<qname>{http://www.mycompany.com/model/content/1.0}tradeLicense</qname>
<qname>{http://www.mycompany.com/model/content/1.0}licenseNumber</qname>
<qname>{http://www.mycompany.com/model/content/1.0}companyName</qname>
<qname>{http://www.mycompany.com/model/content/1.0}legalType</qname>
<qname>{http://www.mycompany.com/model/content/1.0}expiryDate</qname>
<qname>{http://www.mycompany.com/model/content/1.0}issueDate</qname>
</simple-search-additional-attributes>
</client>
</config>

</alfresco-config>

but, when i search with a keyword which i entered in the any one of the above properties, it is getting the result. Can anyone tell me why its not getting the result properly? What i need to do to make this work?

2 Replies
andy1
Senior Member

Re: Search is not working

Hi

I will start by saying I know nothing about the share bits you are trying to configure ..... or what they affect

However it may be that changing the query template is the correct answer.

See https://community.alfresco.com/people/andy1/blog/2017/06/28/query-templates-in-share-and-the-public-... 

Andy

yuva
Active Member

Re: Search is not working

Hi

I have changed the query template and placed both the files in  : workspace\alfmodule\alfmodule-repo-amp\src\main\amp\config\alfresco\extension\templates folder.But still if i search with the value contained by the property which i mentioned in search.get.config.xml and live-search-docs.get.config.xml is not filtering the values.