Skip to content

Commit df534a2

Browse files
Merge pull request #1512 from darrell-k/FTS_exclude_token
FTS exclude tokens
2 parents ab95b3e + fba3f3d commit df534a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Slim/Plugin/FullTextSearch/Plugin.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ sub parseSearchTerm {
387387
push @quoted, '"' . $quoted . '"';
388388
}
389389

390-
my @tokens = grep /\w+/, split(/[\s[:punct:]]/, $search);
390+
my @tokens = grep /\-?\w/, split(/(?[ ( [:punct:] - [-] ) + \s ])|\b\-/, $search);
391391
my $noOfTokens = scalar(@tokens) + scalar(@quoted);
392392

393393
my @tokens = map {

0 commit comments

Comments
 (0)