Prevent error caused by trying to add a posting for an empty term (created by unac on really weird data)
This commit is contained in:
parent
494c57ee9c
commit
d68eacc172
2 changed files with 12 additions and 1 deletions
|
@ -677,6 +677,10 @@ public:
|
|||
// and remember relative.
|
||||
m_ts->curpos = pos;
|
||||
pos += m_ts->basepos;
|
||||
// Don't try to add empty term Xapian doesnt like it... Safety check
|
||||
// this should not happen.
|
||||
if (term.empty())
|
||||
return true;
|
||||
string ermsg;
|
||||
try {
|
||||
// Index without prefix, using the field-specific weighting
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue