Search Query Syntax - clojars/clojars-web GitHub Wiki
We can see a search query as a bunch of terms and operators, let's explore several ways to use our Lucene search engine:
Available fields
The following fields (with examples) are searchable using the field-name:search-term syntax (without the field prefix, all fields are searched):
group-id-group-id:com.cemerickartifact-id-artifact-id:clj*description- the description pulled from the pom:description:usefullicenses- a concatenation of any licenses listed in the pom:licenses:miturl- the homepage listed in the pom:url:gitlab.comat- the time the release was created. Times are best queried as ranges, either using the default Lucene syntax of specifying epoch times:at:[1515200516 TO 1515274516]or as ISO-8601 datetime strings (a Clojars extension to Lucene's search syntax):at:[2017-12-24T00:00:00Z TO 2018-01-01T00:00:00Z]
As a convenience, the search API will expand foo/bar to ((group-id:foo AND artifact-id:bar) OR "foo/bar". If you want to match foo/bar exactly, provide it as a quoted phrase ("foo/bar").
Terms
There are 2 types of terms:
- A
termis a single word such asoauthorsql - A
phraseis just a bunch of words grouped by quotes, like"sql builder"
Boolean operators
Terms can be combined with operators in order to build more complex queries (note that these have to be uppercase):
ANDmatches both terms, i.e.google AND oauthNOTexcludes the term after NOT, i.e.auth NOT SNAPSHOTORmatches if either of the terms is present, i.e.ldap OR saml
Grouping
Parentheses can be used to form sub queries, i.e. (ldap OR saml) AND ADFS
Wildcards
?single character wildcard search for terms that matches with a single character replaced, i.e.oauth?*multiple character wildcard searches for 0 or more characters, i.e.oauth*
Do not use ? or * as the first character of a search
See also: Lucene's own Query Syntax Tutorial.