[Xapian-discuss] Get the FLINT_BTREE_MAX_KEY_LEN variable in Python
Rafael SDM Sierra
sdm at underlinux.com.br
Sat Nov 25 16:24:36 GMT 2006
How can I get this variable? because it is raising an error when I try
replace the document, instead when I add the posting, so, to avoid these
kind of error, I can do some "if len(word) > max_length_allowed: continue"
and go ahead, I think that this value is variable in some machines, here is
987 bytes....yes, I know that no one can remember a word with this size, so,
for now I will limit this manually (200 chars is veery good, I don't know
one word with this size)
Look:
Traceback (most recent call last):
File "bot.py", line 47, in ?
f.save()
File "/home/sdm/workspace/gandalf/index/../../gandalf/__init__.py", line
128, in save
self.index.replace_document(unique_key, doc)
ValueError: InvalidArgumentError: Key_ too long: length was 987 bytes,
maximum length of a key is FLINT_BTREE_MAX_KEY_LEN bytes
--
SDM Underlinux
http://stiod.wordpress.com
Membro da equipe UnderLinux
--
PEP-8
There is only 2 kinds of peoples in the world, who know English, and me. oO
More information about the Xapian-discuss
mailing list