#5349 NORM Never A: custom properties will be silently ignored after reboot
Zarro Boogs per Child
bugtracker at laptop.org
Wed Dec 5 16:35:30 EST 2007
#5349: custom properties will be silently ignored after reboot
------------------------+---------------------------------------------------
Reporter: tomeu | Owner: tomeu
Type: defect | Status: new
Priority: normal | Milestone: Never Assigned
Component: datastore | Version:
Resolution: | Keywords: Update.1?
Verified: 0 |
------------------------+---------------------------------------------------
Comment(by tomeu):
{{{
diff --git a/src/olpc/datastore/model.py b/src/olpc/datastore/model.py
diff --git a/src/olpc/datastore/xapianindex.py
b/src/olpc/datastore/xapianindex.py
index dfef53c..1920ea7 100644
--- a/src/olpc/datastore/xapianindex.py
+++ b/src/olpc/datastore/xapianindex.py
@@ -288,19 +288,22 @@ class IndexManager(object):
external = kwargs.pop('external', False)
xi = self.write_index.add_field_action
-
- if store: xi(key, secore.FieldActions.STORE_CONTENT)
- if exact: xi(key, secore.FieldActions.INDEX_EXACT)
- elif fulltext:
- # weight -- int 1 or more
- # nopos -- don't include positional information
- # noprefix -- boolean
- xi(key, secore.FieldActions.INDEX_FREETEXT,
language=language, **kwargs)
-
- if sortable:
- xi(key, secore.FieldActions.SORTABLE, type=type)
- if collapse:
- xi(key, secore.FieldActions.COLLAPSE)
+
+ try:
+ if store: xi(key, secore.FieldActions.STORE_CONTENT)
+ if exact: xi(key, secore.FieldActions.INDEX_EXACT)
+ elif fulltext:
+ # weight -- int 1 or more
+ # nopos -- don't include positional information
+ # noprefix -- boolean
+ xi(key, secore.FieldActions.INDEX_FREETEXT,
language=language, **kwargs)
+
+ if sortable:
+ xi(key, secore.FieldActions.SORTABLE, type=type)
+ if collapse:
+ xi(key, secore.FieldActions.COLLAPSE)
+ except secore.IndexerError, e:
+ logging.warning('Could not add field %r: %s' % (key, e))
# track this to find missing field configurations
self.fields.add(key)
}}}
--
Ticket URL: <http://dev.laptop.org/ticket/5349#comment:1>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system
More information about the Bugs
mailing list