Web · Wiki · Activities · Blog · Lists · Chat · Meeting · Bugs · Git · Translate · Archive · People · Donate

Commit 3da458ab108ae31c846fb2aeb3efe67e0d9ae925

Don't index terms longer than the hardcoded Xapian limit

Xapian has a hardcoded limit of 245 characters for terms.
  
108108 elif not isinstance(value, str):
109109 value = str(value)
110110
111 # We need to add the full value (i.e. not split into words), too, so
112 # we can enumerate unique values. It also simplifies setting up
113 # dictionary-based queries.
114 self._document.add_term(_PREFIX_FULL_VALUE + prefix + value)
111 # Hardcoded Xapian term length limit
112 if len(prefix + value) < 240:
113 # We need to add the full value (i.e. not split into words), too,
114 # so we can enumerate unique values. It also simplifies setting up
115 # dictionary-based queries.
116 self._document.add_term(_PREFIX_FULL_VALUE + prefix + value)
115117
116118 self.index_text(value, 1, prefix)
117119 self.increase_termpos()