Skip to content

Query parser errors need more graceful handling #417

@jondgoodwin

Description

@jondgoodwin

The query parser (QueryParser.cpp) detects and handles ill-formed queries via thrown ParseError or other RecoverableError exceptions. However, such exceptions are currently not caught by QueryRunner.cpp as part of a spawned thread, causing REPL or any other caller to crash with little to no helpful diagnostic message.

It would be preferable to catch these exceptions and communicate the appropriate error condition as an alternative result within statistics. REPL query could then detect this error result and communicate/handle it appropriately.

Also: I recommend treating a single term phrase as a unigram in QueryParser::ParsePhrase. Thus, instead of treating "term" as an error, this query would be treated as equivalent to term.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions