Query Language examples
Example filter terms for `ElasticSearch-6`search:
query lang: ES 6 Query Language
The reserved characters needed espace by `\`: + - = && || > < ! ( ) { } [ ] ^ " ~ * ? : \ /
search type: Commit message
*indexed fields*:
commit_id, message, repo_name, repo_name.raw,
repository_group, repo_type, author.email, author.first_name,
author.last_name, author.email.raw, author.first_name.raw, author.last_name.raw
# find fix in commits by certain author
fix author.email:johannes@rhodecode.com
# find "security" in commit messages in two repositories
security repo_name:(rhodecode-vcsserver OR rhodecode-enterprise-ce)
search type: File path
*indexed fields*:
repo_name, repo_name.raw, repository_group, repo_type,
file, file.raw, extension, size,
lines
# search for .h files in specific repository
file.raw:*.h repo_name.raw:cython
# search for .js files in specific repository over 1000 lines
extension:js repo_name.raw:cython lines:[1000 TO *]
# search for .js files in specific repository over 200kb in size
extension:js size:[204800 TO *]
search type: File content
*indexed fields*:
content, repo_name, repo_name.raw, repository_group,
repo_type, file, file.raw, extension,
size, lines, repository_group
# search for TODO string in .conf files for all repositories that start with 'develop-'
repo_name:develop-* file:*.conf TODO
# search for files with more than 1000 lines in specific repository group
repo_name.raw:upstream\/* lines:[1000 TO *]
# search for TODO in .py files that are bigger than 200KB
file:*.py TODO size:[204800 TO *]
# search for TODO in files with .py extension and only in two repositories
extension:py TODO repo_name:(rhodecode-vcsserver OR rhodecode-enterprise-ce)
# exclude certain paths by exact matches
TODO -file.raw:rhodecode\/lib\/dbmigrate\/schema\/*.py -file.raw:rhodecode\/public\/js\/rhodecode\/i18n\/*.js
# search text or md files inside the repository rhodoecode-vcsserver
file:(*txt OR *.md) repo_name:rhodecode-vcsserver
# search for .json files with >10000 lines but exclude grunt_config.json files from search
file:*.json -file:*grunt_config.json lines:[10000 TO *]