Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
dd26a5cf
Commit
dd26a5cf
authored
Jun 20, 2018
by
Mario de la Ossa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add filters to Advanced Syntax Search docs
parent
873de89b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
7 deletions
+26
-7
doc/user/search/advanced_search_syntax.md
doc/user/search/advanced_search_syntax.md
+26
-7
No files found.
doc/user/search/advanced_search_syntax.md
View file @
dd26a5cf
...
...
@@ -34,14 +34,33 @@ boolean operators, and much more.
Full details can be found in the
[
Elasticsearch documentation
][
elastic
]
, but
here's a quick guide:
*
Searches look for all the words in a query, in any order - e.g.: searching
-
Searches look for all the words in a query, in any order - e.g.: searching
issues for
`display bug`
will return all issues matching both those words, in any order.
*
To find the exact term, use double quotes:
`"display bug"`
*
To find bugs not mentioning display, use
`-`
:
`bug -display`
*
To find a bug in display or sound, use
`|`
:
`bug display | sound`
*
To group terms together, use parentheses:
`bug | (display +sound)`
*
To match a partial word, use
`*`
:
`bug find_by_*`
*
To find a term containing one of these symbols, use
`\`: `
argument
\-
last
`
-
To find the exact term, use double quotes:
`"display bug"`
-
To find bugs not mentioning display, use
`-`
:
`bug -display`
-
To find a bug in display or sound, use
`|`
:
`bug display | sound`
-
To group terms together, use parentheses:
`bug | (display +sound)`
-
To match a partial word, use
`*`
:
`bug find_by_*`
-
To find a term containing one of these symbols, use
`\`: `
argument
\-
last
`
### Syntax search filters
The Advanced Syntax Search also supports the use of filters. The available filters are:
- filename: Filters by filename. You can use the glob (`
*
`) operator for fuzzy matching.
- path: Filters by path. You can use the glob (`
*
`) operator for fuzzy matching.
- extension: Filters by extension in the filename. Please write the extension without a leading dot. Exact match only.
To use them, simply add them to your query in the format `
<filter
_name
>
:
<value>
` without
any spaces between the colon (`
:
`) and the value.
Examples:
- Finding a file with any content named `
hello_world.rb
`: `
*
filename:hello_world.rb
`
- Finding a file named `
hello_world
` with the text `
whatever
` inside of it: `
whatever filename:hello_world
`
- Finding the text 'def create' inside files with the `
.rb
` extension: `
def create extension:rb
`
- Finding the text `
sha
` inside files in a folder called `
encryption
`: `
sha path:encryption
`
- Finding any file starting with `
hello
` containing `
world
` and with the `
.js
` extension: `
world filename:hello
*
extension:js
`
[
ee
]:
https://about.gitlab.com/pricing/
[
elastic
]:
https://www.elastic.co/guide/en/elasticsearch/reference/5.3/query-dsl-simple-query-string-query.html#_simple_query_string_syntax
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment