Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/olpc/datastore/model.py
diff options
context:
space:
mode:
authorBenjamin Saller <bcsaller@objectrealms.net>2007-08-31 05:14:27 (GMT)
committer Benjamin Saller <bcsaller@objectrealms.net>2007-08-31 05:14:27 (GMT)
commit48aad0795a4bf8110a7ac48707be3bdc7743597c (patch)
tree2e1466adca17d38c8b6a042743d84d9fe8c79fca /src/olpc/datastore/model.py
parent57e90f572b41d40f9601c50e2d7e63bc47a6279a (diff)
wip on tagging
Diffstat (limited to 'src/olpc/datastore/model.py')
-rw-r--r--src/olpc/datastore/model.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/olpc/datastore/model.py b/src/olpc/datastore/model.py
index 1e13a13..f17e842 100644
--- a/src/olpc/datastore/model.py
+++ b/src/olpc/datastore/model.py
@@ -349,6 +349,10 @@ registerPropertyType('text', noop, noop, 'string', {'store' : True,
'collapse' : True,
})
+registerPropertyType('tag', noop, str.lower, 'string', {'store' : True,
+ 'exact' : True,
+ })
+
# Now the convention is to directly use DBus.ByteArray
registerPropertyType('binary', str, dbus.ByteArray, None, {'store' : True,
'exact' : False,
@@ -397,9 +401,10 @@ defaultModel = Model().addFields(
('ctime', 'date'),
('mtime', 'date'),
# this will just be a space delimited list of tags
- # indexed with the content
- # I give them high weight as they have user given semantic value.
- ('tags', 'text', {'weight' :3 } ),
+ # tags are case-insensitive and managed via the tags() API call
+ # while they can be set as normal properties with checkin that
+ # will create new versions and the tags() call will not.
+ ('tags', 'tag'),
# olpc specific
('activity', 'string'),