A Query is a series of clauses. A clause may be prefixed by:
Opengrok supports escaping special characters that are part of the query syntax. The current list special characters are:
+ - && || ! ( ) { } [ ] ^ " ~ * ? : \
To escape these character use the \ before the character. For example to search for (1+1):2 use the query: \(1\+1\)\:2
full: Full text search.
defs: Only finds symbol definitions.
refs: Only finds symbols.
path: path of the source file.
hist: History log comments
the term(phrases) can be boosted(making it more relevant) using a caret ^ , e.g. help^4 opengrok - will make term help boosted
Examples:
To find where setResourceMonitors is defined
defs:setResourceMonitors
To find files that use sprintf in usr/src/cmd/cmd-inet/usr.sbin/
refs:sprintf path:usr/src/cmd/cmd-inet/usr.sbin
To find assignments to variable Asign
"Asign="
To find Makefiles where pstack binary is being built
pstack path:Makefile
to search for phrase "Bill Joy":
"Bill Joy"
To find perl files that do not use /usr/bin/perl but something else,
-"/usr/bin/perl" +"/bin/perl"
Opengrok search is powered by lucene, for more detail on query syntax refer to lucene docs.