diff --git a/rhodecode/controllers/search.py b/rhodecode/controllers/search.py
--- a/rhodecode/controllers/search.py
+++ b/rhodecode/controllers/search.py
@@ -107,5 +107,6 @@ class SearchController(BaseRepoControlle
c.runtime = execution_time
c.cur_query = search_query
c.search_type = search_type
+ c.searcher = searcher
# Return a rendered template
return render('/search/search.mako')
diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py
--- a/rhodecode/lib/helpers.py
+++ b/rhodecode/lib/helpers.py
@@ -1842,6 +1842,24 @@ def journal_filter_help():
)
+def search_filter_help(searcher):
+
+ terms = ''
+ return _(
+ 'Example filter terms for `{searcher}` search:\n' +
+ '{terms}\n' +
+ 'Generate wildcards using \'*\' character:\n' +
+ ' "repo_name:vcs*" - search everything starting with \'vcs\'\n' +
+ ' "repo_name:*vcs*" - search for repository containing \'vcs\'\n' +
+ '\n' +
+ 'Optional AND / OR operators in queries\n' +
+ ' "repo_name:vcs OR repo_name:test"\n' +
+ ' "owner:test AND repo_name:test*"\n' +
+ 'More: {search_doc}'
+ ).format(searcher=searcher.name,
+ terms=terms, search_doc=searcher.query_lang_doc)
+
+
def not_mapped_error(repo_name):
flash(_('%s repository is not mapped to db perhaps'
' it was created or renamed from the filesystem'
diff --git a/rhodecode/lib/index/__init__.py b/rhodecode/lib/index/__init__.py
--- a/rhodecode/lib/index/__init__.py
+++ b/rhodecode/lib/index/__init__.py
@@ -33,6 +33,8 @@ default_location = '%(here)s/data/index'
class BaseSearch(object):
+ query_lang_doc = ''
+
def __init__(self):
pass
diff --git a/rhodecode/lib/index/whoosh.py b/rhodecode/lib/index/whoosh.py
--- a/rhodecode/lib/index/whoosh.py
+++ b/rhodecode/lib/index/whoosh.py
@@ -61,7 +61,8 @@ log = logging.getLogger(__name__)
class Search(BaseSearch):
-
+ # this also shows in UI
+ query_lang_doc = 'http://whoosh.readthedocs.io/en/latest/querylang.html'
name = 'whoosh'
def __init__(self, config):
diff --git a/rhodecode/templates/search/search.mako b/rhodecode/templates/search/search.mako
--- a/rhodecode/templates/search/search.mako
+++ b/rhodecode/templates/search/search.mako
@@ -63,6 +63,7 @@
${h.select('type',c.search_type,[('content',_('File contents')), ('commit',_('Commit messages')), ('path',_('File names')),],id='id_search_type')}
+
${_('Example Queries')}
+ +