cancel
Showing results for 
Search instead for 
Did you mean: 

Tag search using Advance Seach

vikash_patel
Star Contributor
Star Contributor

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 3

cesarista
World-Class Innovator
World-Class Innovator

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.

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
Legendary Innovator
Legendary Innovator

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.