You can also retrieve a list of Tags that have already been used and are stored in the message archive. You can search for exact or a partial of the tag or mention. The following request is searching for tags that are 'like' #test, in this case any tags with #test present will show in a list.
<iq type="set" id="tagquery"> <tags xmlns="http://tigase.org/protocol/archive#query" like="#test"/> </iq>
The result will return tags with #test in them:
<iq type="result" id="tagquery"> <tags xmlns="http://tigase.org/protocol/archive#query" like="#test"> <tag>#test1</tag> <tag>#test123</tag> <tag>#testwin</tag> <set xmlns="http://jabber.org/protocol/rsm"> <first index='0'>0</first> <last>2</last> <count>3</count> </set> </tags> </iq>
You may retrieve a list of tags or mentions by using just the # or @ symbols in the like= field.