Skip to content
Snippets Groups Projects

Implement accurate intersection and union behavior for and/or queries

Merged Administrator requested to merge rvt/accurate-intersect into master

Created by: rvantonder

We need to evaluate and vs. or queries quite differently due to the semantics. This function splits up the logic in evaluateOperator to evaluateAnd and evaluateOr.

The task for getting an accurate number of results for something like count:100 in an and-query is quite complex. Please see in line comments.

I'm still testing this manually. Putting this up for review now because I've converged on the implementation.

Merge request reports

Merged by avatar (Jul 5, 2025 6:30am UTC)

Merge details

  • Changes merged into master with 0bd720a4.
  • Deleted the source branch.

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 #9815 into master will decrease coverage by 0.03%. The diff coverage is 0.00%.

    @@            Coverage Diff             @@
    ##           master    #9815      +/-   ##
    ==========================================
    - Coverage   42.68%   42.64%   -0.04%     
    ==========================================
      Files        1340     1340              
      Lines       73605    73659      +54     
      Branches     6629     6629              
    ==========================================
    - Hits        31417    31413       -4     
    - Misses      39348    39406      +58     
      Partials     2840     2840              
    Flag Coverage Δ
    #unit 42.64% <0.00%> (-0.04%) :arrow_down:
    Impacted Files Coverage Δ
    cmd/frontend/graphqlbackend/search_alert.go 17.75% <0.00%> (-0.24%) :arrow_down:
    cmd/frontend/graphqlbackend/search_results.go 43.37% <0.00%> (-2.98%) :arrow_down:
    internal/search/query/types.go 35.41% <ø> (+0.55%) :arrow_up:
  • Created by: rvantonder

    Am merging now--this will get tests in e2e form or another. This functionality is still feature flagged (the flag is not advertised yet). I'll have more confidence about advertising the flag when doing testing and writing more tests after branch cut.

Please register or sign in to reply
Loading