3.7 KiB
3.7 KiB
stage | group | info | type |
---|---|---|---|
Enablement | Global Search | To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments | reference |
Advanced Search syntax (PREMIUM)
With Advanced Search, you can perform a thorough search through your entire GitLab instance.
The Advanced Search syntax supports fuzzy or exact search queries with prefixes, boolean operators, and much more. Advanced Search uses Elasticsearch's syntax.
WARNING: Advanced Search searches projects' default branches only.
See query examples on the tables below and their respective expected output. The examples link to a search on GitLab.com to help you visualize the output.
General search
Query example | Expected output |
---|---|
“display bug” |
Returns the exact phrase display bug (stemming still applies). |
bug -display |
Results include bug, and exclude display. |
bug | display |
Results include bug or display. |
bug | (display +banner) |
Results include bug or display and banner. |
bug error 50* |
* finds partial matches. Results include bug, error, and the partial 50 (looking for any 500 errors, for example). |
bug \-display |
\ scapes symbols. Results include bug and -display. |
Code Search
Query example | Expected output | Notes |
---|---|---|
filename:*spec.rb |
Returns the specified filename. | Use * for fuzzy matching. |
path:spec/controllers/ |
Returns the specified path location of the repository. | Use * for fuzzy matching. |
extension:js |
Returns the specified file extension. | Do not include a leading dot. This only works with exact matches for the extension. |
blob:998707b421c89b* |
Returns the specified Git object ID. | This only works with exact matches. |
Excluding filters
Filters can also be inverted to filter out results from the result set by prefixing the filter name with a -
(hyphen) character.
Query example | Expected output |
---|---|
rails -filename:gemfile.lock |
Results include rails in all files except the gemfile.lock file. |