Skip to content
Snippets Groups Projects

search: robust keyword scanning

Created by: rvantonder

This PR:

  • fixes a bug where we don't always ensure spaces before/after a keyword that requires it (currently and and or)

I'm introducing a helper function to do lookahead and lookbehind for keywords. The lookbehind is avoidable, but a more involved change, so I will address this later (filed in #9812).

  • the fix also makes keyword scanning more robust, so that queries like or or or also works
  • fixes a bug where parsing would fail if the query only contained whitespace

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: codecov[bot]

    Codecov Report

    Merging #9811 into master will increase coverage by 0.01%. The diff coverage is 100.00%.

    @@            Coverage Diff             @@
    ##           master    #9811      +/-   ##
    ==========================================
    + Coverage   42.06%   42.07%   +0.01%     
    ==========================================
      Files        1340     1340              
      Lines       73727    73739      +12     
      Branches     6629     6629              
    ==========================================
    + Hits        31013    31026      +13     
    + Misses      39874    39872       -2     
    - Partials     2840     2841       +1     
    Flag Coverage Δ
    #unit 42.07% <100.00%> (+0.01%) :arrow_up:
    Impacted Files Coverage Δ
    internal/search/query/parser.go 94.83% <100.00%> (+0.37%) :arrow_up:
Please register or sign in to reply
Loading