my $negator = ($atom =~ s/^-//o) ? '!' : '';
my $truncate = ($atom =~ s/\*$//o) ? '*' : '';
- if (!grep { $atom eq $_ } ('&','|')) { # throw away & and |, not allowed in tsquery, and not really useful anyway
+ if ($atom ne '' and !grep { $atom eq $_ } ('&','|')) { # throw away & and |, not allowed in tsquery, and not really useful anyway
my $class_node = $struct->classed_node($current_class);
$class_node->add_fts_atom( $atom, suffix => $truncate, prefix => $negator, node => $class_node );
$struct->joiner( '&' );