Skip to content

Search backend: narrow query type to query.Basic

Administrator requested to merge cc/restrict-basic-query into main

Created by: camdencheek

This narrows the type on ToSearchJob from query.Q to query.Basic. This was already an implicit requirement because we checked that the query.Q was a basic query inside ToSearchJob.

The goal here is, when we know that a query is a basic query, to have that represented in the type so that we don't have to keep converting between the different types. @rvantonder I think this was your eventual intent with query.Basic, but feel free to redirect if you had another direction in mind.

I could probably scope this down a bit, but this is one where I could just keep splitting it smaller, so this felt like a good place to stop.

Stacked on #34157

Test plan

The surface area of this change is pretty large, but all the code in question is very well tested. I'm depending on those tests to ensure correctness here.

Merge request reports

Loading