quickwit-oss / tantivy

Tantivy is a full-text search engine library inspired by Apache Lucene and written in Rust
MIT License
11.91k stars 666 forks source link

parsing simple quote in query doesn't always give a sensible result #2414

Closed trinity-1686a closed 4 months ago

trinity-1686a commented 4 months ago

when parsing a single-quoted literal without a field and the term contains a :, we seem to do something wrong which results in searching in a non-existing field

"abc:def" => UserInputLiteral(field_name=None, phrase="abc:def", delimiter: DoubleQuotes)
'abc:def' => UserInputLiteral(field_name=Some("'abc"), phrase="def'", delimiter: None)
expected: UserInputLiteral(field_name=None, phrase="abc:def", delimiter: SingleQuotes)