Back to Gitlabhq

Syntax options

doc/drawers/advanced_search_syntax.md

18.11.23.9 KB
Original Source
<!-- Remember to also update the tables in `doc/user/search/advanced_search.md` -->
SyntaxDescriptionExample
"Exact search"gem sidekiq"
~Fuzzy searchJ~ Doe
|Ordisplay | banner
+Anddisplay +banner
-Excludedisplay -banner
*Partialbug error 50*
\Escape\*md
#Issue ID#23456
!Merge request ID!23456
SyntaxDescriptionExample
filename:Filenamefilename:*spec.rb
path:Repository location (full or partial matches)path:spec/workers/
extension:File extension without . (exact matches only)extension:js
blob:Git object ID (exact matches only)blob:998707*

Examples

QueryDescription
rails -filename:gemfile.lockReturns rails in all files except the gemfile.lock file.
RSpec.describe Resolvers -*builderReturns RSpec.describe Resolvers that does not start with builder.
bug | (display +banner)Returns bug or both display and banner.
helper -extension:yml -extension:jsReturns helper in all files except files with a .yml or .js extension.
helper path:lib/gitReturns helper in all files with a lib/git* path (for example, spec/lib/gitlab).