Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Support negation for predicates #24325

@camdencheek

Description

@camdencheek

Right now, we have a blanket ban on negating predicates because of performance concerns. The current implementation of predicates requires converting the predicate into a subquery, and a subexpression can't be negated in our current search query evaluator (only fields can be negated).

An example of when this is useful is a query to find stale repositories: -repo:contains.commit.after(last year)

As the refactors @rvantonder has been working on continue to take shape, and searching our backends becomes something that can be run independently of the current resolver infrastructure, I think we can make predicates look more like the "job" interface that Rijnard has been starting to use in his refactors, which should allow us to implement negation, at least for some predicates.

Metadata

Metadata

Assignees

Labels

team/search-productIssues owned by the search product team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions