diff options
author | Benjamin Saller <bcsaller@objectrealms.net> | 2007-10-05 17:13:51 (GMT) |
---|---|---|
committer | Benjamin Saller <bcsaller@objectrealms.net> | 2007-10-05 17:13:51 (GMT) |
commit | 6cb669d728baeb72cd8df3f3c51fc89e5f0d6833 (patch) | |
tree | 9aeb33eaa51f564dc277dd6e7974c9910ecc1d89 | |
parent | 46463aee1ff3af53ddfe40559706b503d3c2b267 (diff) |
fulltext settings bug. Now storable just stores (for binary props)
-rw-r--r-- | src/olpc/datastore/model.py | 1 | ||||
-rw-r--r-- | src/olpc/datastore/xapianindex.py | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/olpc/datastore/model.py b/src/olpc/datastore/model.py index 7c8afdc..b141269 100644 --- a/src/olpc/datastore/model.py +++ b/src/olpc/datastore/model.py @@ -324,6 +324,7 @@ registerPropertyType('text', noop, noop, 'string', {'store' : True, registerPropertyType('binary', noop, noop, None, {'store' : True, 'exact' : False, + 'fulltext': False, 'sortable' : False}) registerPropertyType('int', str, int, 'float', {'store' : True, diff --git a/src/olpc/datastore/xapianindex.py b/src/olpc/datastore/xapianindex.py index 5847957..99e24f9 100644 --- a/src/olpc/datastore/xapianindex.py +++ b/src/olpc/datastore/xapianindex.py @@ -253,7 +253,7 @@ class IndexManager(object): # # Field management - def addField(self, key, store=True, exact=False, sortable=False, + def addField(self, key, store=True, exact=False, sortable=False, fulltext=True, type='string', collapse=False, **kwargs): language = kwargs.pop('language', self.language) @@ -262,7 +262,7 @@ class IndexManager(object): if store: xi(key, secore.FieldActions.STORE_CONTENT) if exact: xi(key, secore.FieldActions.INDEX_EXACT) - else: + elif fulltext: # weight -- int 1 or more # nopos -- don't include positional information # noprefix -- boolean |