lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Sokolov <msoko...@gmail.com>
Subject SimpleQueryParser does not tokenize on NOT operator
Date Thu, 12 Apr 2018 16:48:00 GMT
I ran into a problem parsing queries like "cat -tiger" with this setup:

SimpleQueryParser configured with NOT_OPERATOR and *without*
WHITESPACE_OPERATOR

In this case, the whole string "cat -tiger" is passed to the analyzer which
generates tokens "cat" and "tiger", so the negation gets dropped.

I'm wondering if perhaps SQP should recognize whitespace followed by "-" as
a an end-of-token?

-Mike

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message