diff options
author | Benjamin Saller <bcsaller@objectrealms.net> | 2007-07-30 04:35:42 (GMT) |
---|---|---|
committer | Benjamin Saller <bcsaller@objectrealms.net> | 2007-07-30 04:35:42 (GMT) |
commit | a31cd062c96fbbd337d181a33b3890d8c2b5f32b (patch) | |
tree | e94b10b55d72b00fc5dbcf7658a2cfdc8c95549c /secore/datastructures.py | |
parent | 4a4283978ffd0e517ef49ccd78704ff328de1393 (diff) |
updated secore to latest
Diffstat (limited to 'secore/datastructures.py')
-rw-r--r-- | secore/datastructures.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/secore/datastructures.py b/secore/datastructures.py index 414625d..b7061fa 100644 --- a/secore/datastructures.py +++ b/secore/datastructures.py @@ -20,6 +20,7 @@ r"""datastructures.py: Datastructures for search engine core. """ __docformat__ = "restructuredtext en" +import errors as _errors import xapian as _xapian import cPickle as _cPickle @@ -117,6 +118,13 @@ class ProcessedDocument(object): # of our locale. if ord(term[0]) >= ord('A') and ord(term[0]) <= ord('Z'): prefix = prefix + ':' + + if len(prefix + term) > 220: + raise _errors.IndexerError("Field %r is too long: maximum length " + "220 - was %d (%r)" % + (field, len(prefix + term), + prefix + term)) + if positions is None: self._doc.add_term(prefix + term, wdfinc) elif isinstance(positions, int): |