Closed ghost closed 6 years ago
Hey @uxnow,
thank you for this PR! Let's talk about each part of it separately:
support grammer whitespace between colon(:) and term;
I like this change and your proposed behavior adheres to Java Lucene's own behavior 👍
support lowercase conjunction operators (and, or, not)
This would be a deviation from the lucene query syntax. Check out the following screenshot which shows how the lucene query parser (the official Java one) handles lower case or
(full example query is: foo or bar
).
I am not willing to accept this part of the PR as it is a deviation from the lucene query syntax.
From the official website:
Boolean operators allow terms to be combined through logic operators. Lucene supports AND, "+", OR, NOT and "-" as Boolean operators (Note: Boolean operators must be ALL CAPS).
https://lucene.apache.org/core/2_9_4/queryparsersyntax.html#Boolean operators
@bripkens thank you for so rapid response.
for the part 2, the fact is our customers want the feature of using lowercase logic operators.
As you mentioned, It is not an official recommended feature, so I will issue another pull request later.
thank you for showing the link from the official website.
added two pieces: