Help and docs
Sign in
gh-pr/71
1 of 1

R4 chore(main): release 0.2.2

Browse files
gitstack 16d 8 files +320 ~12 -48
Landed as 3f7f1f3a See in history
You are on patch 11. Patch 27 was pushed 16d ago Go to patch 27

When the lexer rejected part of a query, like an unterminated quote or a
character it doesn't know, the parser didn't look at the error token.
It kept reducing until it ran out of items and reported "no items left
to reduce" with the parser stack, so a:"abc failed without saying why.
The parser now returns the lexer's message.

Part of #77

A backslash escapes the next character, but one at the very end of the
input had nothing to escape and stayed in the term. a*\ parsed as the
wildcard a*, and a:\ and \ compared against an empty string. Anywhere
else in a query the same backslash escapes what follows it, so that
term could not be written inside a larger query.

It's now a parse error, as it is in Lucene.

Part of #77

A + always started a new token, so a:1E+3 lexed as a:1E AND +3 and
rendered ("a" = '1E') AND (3). 1E-3 worked, because a - inside a word
is part of the word. A term also couldn't start with a dot, so a:.5 and
a:-.5 were lexer errors.

A + is now part of a word when it follows the e of a number's exponent
and comes before a digit. Anywhere else it still starts a new token, so
be+3 is be AND +3 as before. A term can start with a dot, as in Lucene,
and a minus before a dot and a digit is a negative number, like a minus
before a digit already was.

a:+5 stays a parse error. Lucene doesn't allow a term to start with +,
and here a:+x and a:-x don't parse either. Escape it to search for the
text: a:+5.

Part of #77

peek at the end of the input set atEOF, which stopped the next backup from
stepping back, so a:1e+ lexed as the single term 1e+.

Seed the fuzzer with the shapes those fixes cover.

Latest