Skip to content

search: propagate unindexed/indexed request separation to all callers

Created by: rvantonder

Stacked on https://github.com/sourcegraph/sourcegraph/pull/25670.

This extracts logic out of the NewIndexedSearchRequest function and inlines it in all callers. Purely mechanical and semantics preserving. There are only 4 callers (3 in code, 1 in test).

This temporarily means these functions should be called together, as a "pair". If you read some of the inline comments, it becomes a bit clearer that it's not really sensible/maintainable to keep this logic grouped together. Once I'm done the separation will be clearer.


This gets us closer to:

  • extracting zoekt query construction out of NewIndexedSearch
  • will allow to pass only the subset of state needed (not the bloated args, nor patterninfo)
  • incrementally pull the logic up into the call chain for the main line code search path, and defer the other stuff. basically, if I tried to perform this operation in its current state, I needed to deal with too much other fallout in our code (repoHasFile depending on this and whole bunch of other things)

Merge request reports

Loading