You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a number of search qualifiers, and it's not yet possible to compose them. Some of them cannot be composed, so we must have some kind of algebra that determines how qualifiers can be composed. Maybe look at how Github does it?
There are a number of questions to answer:
Which modifiers are mutually-exclusive / cannot be composed?
How do we model a query so that one modifier takes precedence regarding the source? To search for advisories within the dependents of a packages, depends: and hsec: could in theory be both used.
Right now, the search results are taken from PostgreSQL. Is this the appropriate storage engine?
Package qualifiers
depends:<@namespace>/<packagename>: Shows the dependents page for a package
in:<@namespace> <search term>: Searches for a package name in the specified namespace
in:<@namespace>: Lists packages in a namespace
exe:<search term> look for packages that expose an executable with a high proximity to the search term
Advisories
hsec:<search term> look for advisories whose summary contain a high proximity to the search term
Search Language AST:
data SearchQuery
= PackageName SearchOperator Text SearchQuery
| PackageNamespace MembershipOperator Text SearchQuery
| Nil
deriving stock (Eq, Ord, Show)
data EqualityOperator
= NotEquals
| Equals
deriving stock (Eq, Ord, Show)
data MembershipOperator
= In
| NotIn
deriving stock (Eq, Ord, Show)
-- Only for executables right now
data OwnershipOperator
= Has Object
| HasNot Object
deriving stock (Eq, Ord, Show)
data Object
= Executable Name
deriving stock (Eq, Ord, Show)
Then a transformation from SearchQuery to SQL fragments will happen.
The text was updated successfully, but these errors were encountered:
There are a number of search qualifiers, and it's not yet possible to compose them. Some of them cannot be composed, so we must have some kind of algebra that determines how qualifiers can be composed. Maybe look at how Github does it?
There are a number of questions to answer:
depends:
andhsec:
could in theory be both used.Package qualifiers
depends:<@namespace>/<packagename>
: Shows the dependents page for a packagein:<@namespace> <search term>
: Searches for a package name in the specified namespacein:<@namespace>
: Lists packages in a namespaceexe:<search term>
look for packages that expose an executable with a high proximity to the search termAdvisories
hsec:<search term>
look for advisories whose summary contain a high proximity to the search termSearch Language AST:
Then a transformation from
SearchQuery
to SQL fragments will happen.The text was updated successfully, but these errors were encountered: