gitlab-org--gitlab-foss/doc/user/search/global_search/advanced_search_syntax.md

4.9 KiB

stage group info
Data Stores Global Search To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments

Advanced Search syntax (PREMIUM)

With Advanced Search, you can perform a thorough search of your entire GitLab instance.

The Advanced Search syntax supports fuzzy or exact search queries with prefixes, boolean operators, and more. Advanced Search uses Elasticsearch's syntax.

WARNING: Advanced Search searches default project branches only.

Use Description Example
" Exact search "gem sidekiq"
| Or display | banner
+ And display +banner
- Exclude display -banner
* Partial bug error 50*
\ Escape \*md
Use Description Example
filename: Filename filename:*spec.rb
path: Repository location path:spec/workers/
extension: File extension, without the . extension:js
blob: Git object ID blob:998707*

extension and blob return exact matches only.

Examples

Example Description
rails -filename:gemfile.lock Show rails in all files except the gemfile.lock file.
RSpec.describe Resolvers -*builder Show all RSpec.describe Resolvers that don't start with builder.
bug | (display +banner) Show bug or display and banner.
helper -extension:yml -extension:js Show helper in all files, except for files with .yml or .js extensions.