Tags
From HNS.dev
A number of tables support tags. These objects can be supplied with tags by users, which are joined together to form a tag cloud. This tag cloud can subsequently be compared with the tag cloud of other objects.
Contents |
[edit] Add tags
Tags can be added to objects with an insert- or update-query. The fieldname for this is tags and the individual tags are separated by blank spaces, like:
<update> <document id="1"> <tags>education university -vwo</tags> </document> </update>
In this exmple the tags education and university are added to the document referred to. If this user has added the tag vwo before, it is removed. For this the dash is used (-).
[edit] Search Tags
Tags can be read with a selectquery. For example:
<query> <select>tags</select> <from>document</from> <where>id = 1</where> </query>
If tags where defined as before, this example gives the following output:
<?xml version="1.0" encoding="UTF-8"?> <query hash="d2c112f08d51160801448fdbb80247c54f49c0e1"> <person id="1"> <tags> <tag> <name>education</name> <weight>1.00</weight> </tag> <tag> <name>university</name> <weight>1.00</weight> </tag> </tags> </person> </query>
[edit] Matching Tags
It is possible to search for objects based on their tag cloud. These can be compared with the tag cloud of another object uing the match-function.
[edit] See also
- person (table)
- document (table)
- organization (table)
- Query
- Update
- Insert
- Conditions

