268N/AThe contents of this file are subject to the terms of the
268N/ACommon Development and Distribution License (the "License").
268N/AYou may not use this file except in compliance with the License.
268N/Alanguage governing permissions and limitations under the License.
268N/AWhen distributing Covered Code, include this CDDL HEADER in each
268N/AIf applicable, add the following below this CDDL HEADER, with the
268N/Afields enclosed by brackets "[]" replaced with your own identifying
268N/Ainformation: Portions Copyright [yyyy] [name of copyright owner]
268N/ACopyright (c) 2005, 2015, Oracle
and/or its affiliates. All rights reserved.
268N/AUse is subject to license terms.
268N/APortions Copyright 2011 Jens Elkner.
183N/A/* ----------------------
help.jsp start --------------------- */
183N/A <div id="whole_header">
183N/A <div id="Masthead"></div>
183N/ATo find where setResourceMonitors is defined:
183N/A<a href="search?q=&defs=setResourceMonitors">defs:setResourceMonitors</a>
183N/A<a href="search?refs=sprintf&path=usr%2Fsrc%2Fcmd%2Fcmd-inet%
2Fusr.sbin%2F"
183N/ATo find assignments to variable foo:
183N/A<a href="search?q=%22foo+%3D%22">"foo ="</a>
183N/ATo find Makefiles where pstack binary is being built:
183N/A<a href="search?q=pstack&path=Makefile">pstack path:Makefile</a>
183N/Ato search for phrase "Bill Joy":
183N/A<a href="search?q=%22Bill+Joy%22">"Bill Joy"</a>
183N/A<a href="search?q=-%22%2Fusr%2Fbin%2Fperl%22+%2B%22%2Fbin%2Fperl%22"
To find all strings beginning with foo use the wildcard:
<a href="search?q=foo*">foo*</a>
To find all files which have . c in their name (dot is a token!):
<a href="search?path=%22. c%22">". c"</a>
To find all files which start with "ma" and then have only alphabet characters do:
<a href="search?path=/ma[a-zA-Z]*/">path:/ma[a-zA-Z]*/</a>
To find all main methods in all files analyzed by C analyzer (so .c, .h, ...) do:
<a href="search?q=main&type=c">main type:c</a>
A <dfn>Query</dfn> is a series of clauses. A clause may be prefixed by:
<li>a plus "<b>+</b>" or a minus "<b>-</b>" sign, indicating that the clause
is required or prohibited respectively; or</li>
<li>a <dfn>term</dfn> followed by a colon "<b>:</b>", indicating the
<dfn>field</dfn> to be searched. This enables one to construct queries
which search multiple <dfn>fields</dfn>.</li>
<p>A <dfn>clause</dfn> may be either:</p>
<li>a <dfn>term</dfn>, indicating all the documents that contain this term;
<li>a <dfn>phrase</dfn> - group of words surrounded by double quotes
<b>" "</b>,
e.g. "hello dolly" </li>
<li>a nested query, enclosed in parentheses "<b>(</b>" "<b>)</b>" (also
called
query/field <dfn>grouping</dfn>) . Note that this may be used
with a +/- prefix to require any of a set of terms. </li>
<li>boolean <dfn>operators</dfn> which allow terms to be combined through
logic operators. Supported are <b>AND</b>(<b>&&</b>), "<b>+</b>",
<b>OR</b>(<b>||</b>), <b>NOT</b>(<b>!</b>) and "<b>-</b>" (Note: they
<p>Regular Expression, Wildcard, Fuzzy, Proximity & Range Searches:</p>
<li>to perform a regular expression search use the "<b>/</b>" enclosure,
e.g. /[mb]an/ - will search for man or for ban;<br/>
NOTE: path field search escapes "/" by default, so it only supports
regexps when the search string <u>starts and ends</u> with "/".<br/>
<li>to perform a single character wildcard search use the "<b>?</b>" symbol,
<li>to perform a multiple character wildcard search use the "<b>*</b>"
symbol,
e.g. test* or te*t</li>
<li>you can use a * or ? symbol as the first character of a search
(unless not enabled using indexer option -a).</li>
<li>to do a fuzzy search (find words similar in spelling, based on the
Levenshtein Distance, or Edit Distance algorithm) use the tilde,
"<b>~</b>",
e.g. rcs~ </li>
<li>to do a proximity search use the tilde, "~", symbol at the end of a
Phrase. For example to search for a "opengrok" and "help" within 10
words of each other enter: "opengrok help"~10 </li>
<li>range queries allow one to match documents whose field(s) values are
between the lower and upper bound specified by the Range Query. Range
Queries can be inclusive or exclusive of the upper and lower bounds.
Sorting is done lexicographically. Inclusive queries are denoted by
square brackets <b>[ ]</b> , exclusive by curly brackets <b>{ }</b>.
For example: title:{Aida TO Carmen} - will find all documents between
Aida to Carmen, exclusive of Aida and Carmen. </li>
<a id="escaping"><dfn>Escaping special characters:</dfn></a>
Opengrok supports escaping special characters that are part of the query
syntax. Current special characters are:<br/>
<b>+ - && || ! ( ) { } [ ] ^ " ~ * ? : \ / </b><br/>
To escape these character use the \ before the character. For example to
search for <b>(1+1):2</b> use the query: <b>\(1\+1\)\:2</b>
NOTE on analyzers: Indexed words are made up of Alpha-Numeric and Underscore
characters. One letter words are usually not indexed as symbols!<br/>
Most other characters (including single and double quotes) are treated as
most analyzers ignore them). <br/>
The exceptions are: <b>@ $ % ^ & = ? . :</b> which are mostly indexed as
Because some of them are part of the query syntax, they must be escaped with a
reverse slash as noted above.<br/>
So searching for <b>\+1</b> or <b>\+ 1</b> will both find <b>+1</b> and <b>+ 1</b>.
<p>Valid <dfn>FIELDs</dfn> are</p>
<dd>Search through all text tokens (words,strings,identifiers,numbers) in index.</dd>
<dd>Only finds symbol definitions (where
e.g. a variable (function, ...) is defined).</dd>
<dd>Only finds symbols (
e.g. methods, classes, functions, variables).</dd>
<dd>path of the source file (no need to use dividers, or if, then use "/" - Windows users, "\" is an escape key in Lucene query syntax! <br/>Please don't use "\", or replace it with "/").<br/>Also note that if you want just exact path, enclose it in "",
e.g. "
src/mypath", otherwise dividers will be removed and you get more hits.</dd>
<dd>History log comments.</dd>
The term (phrases) can be boosted (making it more relevant) using a caret
<b>^</b> ,
e.g. help^4 opengrok - will make term help boosted
<h4>Intelligence Window</h4>
Key "1" toggles <dfn>Intelligence Window</dfn>. It gives the user many helper actions on the last symbol pointed by the mouse cursor.
<h5>Symbol Highlighting</h5>
Key "2" toggles highlighting of the last symbol pointed by the mouse cursor. This functionality is also accessible via the <dfn>Intelligence Window</dfn>.
Key "3" toggles unhighlighting all symbols. This functionality is also accessible via the <dfn>Intelligence Window</dfn>.
You can close the intelligence window either by mouse in the right upper corner or by keyboard with "Esc" key.
By 'n' for next and 'b' for back you can jump between the symbols easily only with keyboard. When there is no symbol highlighted then the jump
is made to the next symbol in the file from the current one. If you have highlighted a specific symbol then the jump is done only among the highlighted symbols.
The OpenGrok also provides an easy way how to jump through the large diffs finding the interesting pieces of code. In the diff mode you can enable diff jumper by hitting the "jumper" button.
<h5>Mouse and keyboard navigation</h5>
You can then use your mouse to intuitively navigate yourself through the diff. Also there is a convenient shortcut for moving on your keyboard,
you can use 'n' for next and 'b' for back to jump over to the next chunk. This is available even when the jumper window is not opened.
/* ----------------------
help.jsp end --------------------- */