Tag search using Advance Seach

cancel
Showing results for 
Search instead for 
Did you mean: 
vikash_patel
Established Member II

Tag search using Advance Seach

I have customize advance search for tag search but it is not giving any result. i have added Tag search box using following code(share-config-custom.xml).

<config evaluator="model-type" condition="cm:content"> 
<forms>
   <form id="search">
    <field-visibility>
       <show id='cm:taggable' force="true" />
    </field-visibility> <appearance>
     <field id="cm:taggable">
      <control>
         <control-param name="compactMode">true</control-param>
         <control-param name="params">aspect=cm:taggable</control-param>
         <control-param name="createNewItemUri">/api/tag/workspace/SpacesStore</control-param>
         <control-param name="createNewItemIcon">tag</control-param>
          <control-param name="mode">AND</control-param> <!-- AND or OR -->
      </control>
     </field>
    </appearance>
   </form>
  </forms>
</config>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

This query is executed : TYPE:"cm:content" AND ((cm:taggable:ffe8fd19-41f1-4d01-aa35-32db1325975c))

3 Replies
cesarista
Customer

Re: Tag search using Advance Seach

Hi:

I don't see anything strange, except some blank spaces for control-param param and createNewItemUri.

I do not use OR in tag searches (I prefer AND). I use to ignore this line.

How did you see the query ? Maybe with something like this ? --> - How to get logs for Alfresco querys - zylk 

Did you try query directly in Alfresco search ? 

Regards.

--C.

vikash_patel
Established Member II

Re: Tag search using Advance Seach

i have tried that query in node browser but it does not give any result.

whenever we make any search using AdvanceSearch for Tag like 'TAG:mytag' below query is fired.

actual tag search query is like this  TYPE:"cm:content" AND (TAG:mytag).

afaust
Master

Re: Tag search using Advance Seach

The resulting query is invalid - the nodeRef should be enclosed in quotation marks or the "-" characters should be escaped. I remember there has been a change in Repository-tier search.lib.js with version 5.0 that broke such constellations, forcing me to patch it for at least one customer.