tantivy icon indicating copy to clipboard operation
tantivy copied to clipboard

Add a lenient query parser

Open zoonage opened this issue 2 years ago • 1 comments

  • #5
  • Question: Is there some way of consolidating the special chars with no spaces and one without?
  • If a query cannot be passed all the special characters are removed from the query string. If that fails to be compiled into an AST then an empty query (which should return no results) will be returned.
  • Add unicode-perl as a feature flag to regex due to
    ---- query_grammar::test::test_field_name_re stdout ----
    thread 'query_grammar::test::test_field_name_re' panicked at 'called `Result::unwrap()` on an `Err` value: Syntax(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    regex parse error:
        \\(\+|\^|`|:|\{|\}|"|\[|\]|\(|\)|\~|!|\\|\*|\s)
                                                    ^^
    error: Unicode-aware Perl class not found (make sure the unicode-perl feature is enabled)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    )', query-grammar/src/query_grammar.rs:573:82
    

zoonage avatar Jun 02 '22 00:06 zoonage

Just realised that this PR is in the wrong bit of the code, moving it into the QueryParser bit

zoonage avatar Jun 02 '22 00:06 zoonage

Is this waiting for changes? Happy to help if I can to get this across the line

lukethacoder avatar Nov 15 '22 13:11 lukethacoder

Is this waiting for changes? Happy to help if I can to get this across the line

@lukethacoder feel free to take it from here, I've not got time to work on this unfortunately

zoonage avatar Jun 20 '23 11:06 zoonage

@zoonage the issue #5 was reassigned to @trinity-1686a who is currently working on it.

fmassot avatar Jun 20 '23 11:06 fmassot