c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeCDDL HEADER START
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeThe contents of this file are subject to the terms of the
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders HatlenCommon Development and Distribution License (the "License").
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeYou may not use this file except in compliance with the License.
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeSee LICENSE.txt included in this distribution for the specific
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbyelanguage governing permissions and limitations under the License.
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeWhen distributing Covered Code, include this CDDL HEADER in each
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbyefile and include the License file at LICENSE.txt.
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeIf applicable, add the following below this CDDL HEADER, with the
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbyefields enclosed by brackets "[]" replaced with your own identifying
c0550b01024b910b8c1468811c0ea663b10b1372Trond Norbyeinformation: Portions Copyright [yyyy] [name of copyright owner]
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeCDDL HEADER END
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry PanCopyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeUse is subject to license terms.
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerPortions Copyright 2011 Jens Elkner.
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner--%><%@ page session="false" errorPage="error.jsp" import="
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner/* ---------------------- help.jsp start --------------------- */
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen cfg.setTitle("OpenGrok Help");
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <div id="page">
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <div id="whole_header">
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <div id="header"><%@
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <div id="Masthead"></div>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <div id="sbar">
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <div id="menu"><%@
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerinclude file="menu.jspf"
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <div id="help">
689c2c8d7d285f355a90f35469326d5e51777042Harry Pan<h4>Examples:</h4>
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos Kosco<pre class="example">
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry PanTo find where setResourceMonitors is defined:
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos Kosco<a href="search?q=&defs=setResourceMonitors">defs:setResourceMonitors</a>
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos KoscoTo find files that use sprintf in usr/src/cmd/cmd-inet/usr.sbin/:
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos Kosco<a href="search?refs=sprintf&path=usr%2Fsrc%2Fcmd%2Fcmd-inet%2Fusr.sbin%2F"
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos Kosco>refs:sprintf path:usr/src/cmd/cmd-inet/usr.sbin</a>
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos KoscoTo find assignments to variable foo:
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos Kosco<a href="search?q=%22foo+%3D%22">"foo ="</a>
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos KoscoTo find Makefiles where pstack binary is being built:
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos Kosco<a href="search?q=pstack&path=Makefile">pstack path:Makefile</a>
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos Koscoto search for phrase "Bill Joy":
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos Kosco<a href="search?q=%22Bill+Joy%22">"Bill Joy"</a>
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos KoscoTo find perl files that do not use /usr/bin/perl but something else:
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos Kosco<a href="search?q=-%22%2Fusr%2Fbin%2Fperl%22+%2B%22%2Fbin%2Fperl%22"
4fd421f78fa03a25d6771c9347f33699ae8ca20cLubos KoscoTo find all strings beginning with foo use the wildcard:
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos Kosco<a href="search?q=foo*">foo*</a>
99b4056e2c5b0a51f7f480ebcefb1f917613ce2aLubos KoscoTo find all files which have . c in their name (dot is a token!):
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos Kosco<a href="search?path=%22. c%22">". c"</a>
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos KoscoTo find all files which start with "ma" and then have only alphabet characters do:
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos Kosco<a href="search?path=/ma[a-zA-Z]*/">path:/ma[a-zA-Z]*/</a>
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos KoscoTo find all main methods in all files analyzed by C analyzer (so .c, .h, ...) do:
9a4361e23046cda58b9a5b8f4e11910dc433badaLubos Kosco<a href="search?q=main&type=c">main type:c</a>
689c2c8d7d285f355a90f35469326d5e51777042Harry Pan<h4>More info:</h4>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry PanA <dfn>Query</dfn> is a series of clauses. A clause may be prefixed by:
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>a plus "<b>+</b>" or a minus "<b>-</b>" sign, indicating that the clause
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen is required or prohibited respectively; or</li>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>a <dfn>term</dfn> followed by a colon "<b>:</b>", indicating the
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <dfn>field</dfn> to be searched. This enables one to construct queries
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen which search multiple <dfn>fields</dfn>.</li>
689c2c8d7d285f355a90f35469326d5e51777042Harry Pan<p>A <dfn>clause</dfn> may be either:</p>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>a <dfn>term</dfn>, indicating all the documents that contain this term;
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>a <dfn>phrase</dfn> - group of words surrounded by double quotes
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <b>" "</b>, e.g. "hello dolly" </li>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>a nested query, enclosed in parentheses "<b>(</b>" "<b>)</b>" (also
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen called query/field <dfn>grouping</dfn>) . Note that this may be used
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen with a +/- prefix to require any of a set of terms. </li>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>boolean <dfn>operators</dfn> which allow terms to be combined through
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen logic operators. Supported are <b>AND</b>(<b>&&</b>), "<b>+</b>",
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <b>OR</b>(<b>||</b>), <b>NOT</b>(<b>!</b>) and "<b>-</b>" (Note: they
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen must be ALL CAPS).</li>
9c4ded641ae76132f262728f5d64e30fb004ae47Lubos Kosco<p>Regular Expression, Wildcard, Fuzzy, Proximity & Range Searches:</p>
9c4ded641ae76132f262728f5d64e30fb004ae47Lubos Kosco <li>to perform a regular expression search use the "<b>/</b>" enclosure,
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan e.g. /[mb]an/ - will search for man or for ban;<br/>
73189ea86c6fb0af01e16eaa5b0da3f2bb775c41Harry Pan NOTE: path field search escapes "/" by default, so it only supports
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan regexps when the search string <u>starts and ends</u> with "/".<br/>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan More info can be found on <a href="http://lucene.apache.org/core/<%=SearchEngine.LUCENE_VERSION_HELP%>/core/org/apache/lucene/util/automaton/RegExp.html?is-external=true">Lucene regexp page</a>.
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>to perform a single character wildcard search use the "<b>?</b>" symbol,
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>to perform a multiple character wildcard search use the "<b>*</b>"
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen symbol, e.g. test* or te*t</li>
9c4ded641ae76132f262728f5d64e30fb004ae47Lubos Kosco <li>you can use a * or ? symbol as the first character of a search
9c4ded641ae76132f262728f5d64e30fb004ae47Lubos Kosco (unless not enabled using indexer option -a).</li>
99b4056e2c5b0a51f7f480ebcefb1f917613ce2aLubos Kosco <li>to do a fuzzy search (find words similar in spelling, based on the
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen Levenshtein Distance, or Edit Distance algorithm) use the tilde,
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen "<b>~</b>", e.g. rcs~ </li>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>to do a proximity search use the tilde, "~", symbol at the end of a
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen Phrase. For example to search for a "opengrok" and "help" within 10
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen words of each other enter: "opengrok help"~10 </li>
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen <li>range queries allow one to match documents whose field(s) values are
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen between the lower and upper bound specified by the Range Query. Range
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen Queries can be inclusive or exclusive of the upper and lower bounds.
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen Sorting is done lexicographically. Inclusive queries are denoted by
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen square brackets <b>[ ]</b> , exclusive by curly brackets <b>{ }</b>.
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen For example: title:{Aida TO Carmen} - will find all documents between
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen Aida to Carmen, exclusive of Aida and Carmen. </li>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<a id="escaping"><dfn>Escaping special characters:</dfn></a>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan Opengrok supports escaping special characters that are part of the query
59b6a8c0cc6ef741a7180504b3c371e67c2aa338Knut Anders Hatlen syntax. Current special characters are:<br/>
9c4ded641ae76132f262728f5d64e30fb004ae47Lubos Kosco <b>+ - && || ! ( ) { } [ ] ^ " ~ * ? : \ / </b><br/>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan To escape these character use the \ before the character. For example to
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan search for <b>(1+1):2</b> use the query: <b>\(1\+1\)\:2</b>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan NOTE on analyzers: Indexed words are made up of Alpha-Numeric and Underscore
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan characters. One letter words are usually not indexed as symbols!<br/>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan Most other characters (including single and double quotes) are treated as
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan "spaces/whitespace" (so even if you escape them, they will not be found, since
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan most analyzers ignore them). <br/>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan The exceptions are: <b>@ $ % ^ & = ? . :</b> which are mostly indexed as
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan separate words.<br/>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan Because some of them are part of the query syntax, they must be escaped with a
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan reverse slash as noted above.<br/>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan So searching for <b>\+1</b> or <b>\+ 1</b> will both find <b>+1</b> and <b>+ 1</b>.
689c2c8d7d285f355a90f35469326d5e51777042Harry Pan<p>Valid <dfn>FIELDs</dfn> are</p>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan<dl class="fields">
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan <dt>full</dt>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan <dd>Search through all text tokens (words,strings,identifiers,numbers) in index.</dd>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan <dt>defs</dt>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan <dd>Only finds symbol definitions (where e.g. a variable (function, ...) is defined).</dd>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan <dt>refs</dt>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan <dd>Only finds symbols (e.g. methods, classes, functions, variables).</dd>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan <dt>path</dt>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan <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>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan <dt>hist</dt>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan <dd>History log comments.</dd>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan <dt>type</dt>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan <dd>Type of analyzer used to scope down to certain file types (e.g. just C sources).<br/>Current mappings: <%=SearchHelper.getFileTypeDescriptions().toString()%></dd>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan The term (phrases) can be boosted (making it more relevant) using a caret
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan <b>^</b> , e.g. help^4 opengrok - will make term help boosted
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan<p>Opengrok search is powered by <a href="http://lucene.apache.org/">Lucene</a>,
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Panfor more detail on query syntax refer to <a href="http://lucene.apache.org/core/<%=SearchEngine.LUCENE_VERSION_HELP%>/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description">Lucene docs</a>.
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry Pan<h4>Intelligence Window</h4>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry PanKey "1" toggles <dfn>Intelligence Window</dfn>. It gives the user many helper actions on the last symbol pointed by the mouse cursor.
7bd2c3ec009c3f4fa8befb880b354fee06961acbKryštof Tulinger<img src="<%= cfg.getCssDir() %>/img/intelli-window.png"/>
7bd2c3ec009c3f4fa8befb880b354fee06961acbKryštof Tulinger<h5>Symbol Highlighting</h5>
ba7acbadb299581bd4e995c01d86200e3c04a5c7Harry PanKey "2" toggles highlighting of the last symbol pointed by the mouse cursor. This functionality is also accessible via the <dfn>Intelligence Window</dfn>.
7bd2c3ec009c3f4fa8befb880b354fee06961acbKryštof TulingerKey "3" toggles unhighlighting all symbols. This functionality is also accessible via the <dfn>Intelligence Window</dfn>.
7bd2c3ec009c3f4fa8befb880b354fee06961acbKryštof Tulinger<img src="<%= cfg.getCssDir() %>/img/symbol-highlighting.png"/>
7bd2c3ec009c3f4fa8befb880b354fee06961acbKryštof Tulinger You can close the intelligence window either by mouse in the right upper corner or by keyboard with "Esc" key.
7bd2c3ec009c3f4fa8befb880b354fee06961acbKryštof Tulinger<h5>Symbol jumping</h5>
7bd2c3ec009c3f4fa8befb880b354fee06961acbKryštof TulingerBy '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
7bd2c3ec009c3f4fa8befb880b354fee06961acbKryštof Tulingeris 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.
7bd2c3ec009c3f4fa8befb880b354fee06961acbKryštof Tulinger<h4>Diff jumper</h4>
7bd2c3ec009c3f4fa8befb880b354fee06961acbKryštof TulingerThe 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.
7bd2c3ec009c3f4fa8befb880b354fee06961acbKryštof Tulinger<img src="<%= cfg.getCssDir() %>/img/diff-jumper.png"/>
7bd2c3ec009c3f4fa8befb880b354fee06961acbKryštof Tulinger<h5>Mouse and keyboard navigation</h5>
7bd2c3ec009c3f4fa8befb880b354fee06961acbKryštof TulingerYou can then use your mouse to intuitively navigate yourself through the diff. Also there is a convenient shortcut for moving on your keyboard,
7bd2c3ec009c3f4fa8befb880b354fee06961acbKryštof Tulingeryou 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.
7bd2c3ec009c3f4fa8befb880b354fee06961acbKryštof Tulinger<img src="<%= cfg.getCssDir() %>/img/diff-jumping.png"/>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner/* ---------------------- help.jsp end --------------------- */
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerinclude file="foot.jspf"