Skip to content

insights: save aggregated search as insight

Created by: coury-clark

We need answers for the following problems

Search Context:

  1. Code Insights backend only supports filtering on repo filters inside a search context. If we strip the search context out (this is behavior of the create insight button today) we will not generate the same matches.
  2. Search results using contexts support wider set of filters, and they also support repo@rev targets. These make sense in the model of an aggregation insight where they may not have made sense in a historical insight.
  3. We aren't sure what happens when a user private context is in a query that is executed by the internal actor. Does it load / allow the query to work? Does it have the same behavior? If it doesn't work - why?

Repo filter: Aggregation insight currently requires a list of repositories. We could return back the matched repositories from the aggregation request. For an aggregation insight it probably makes more sense to just outright support repo filters.