help.jsp revision 1330
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesCDDL HEADER START
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesThe contents of this file are subject to the terms of the
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesCommon Development and Distribution License (the "License").
ac7985784d08a3655291f24f711812b4d8b1cbcffuankgYou may not use this file except in compliance with the License.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesSee LICENSE.txt included in this distribution for the specific
bb2b38cd44b032118359afbc743efbea12f48e61bnicholeslanguage governing permissions and limitations under the License.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesWhen distributing Covered Code, include this CDDL HEADER in each
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesfile and include the License file at LICENSE.txt.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesIf applicable, add the following below this CDDL HEADER, with the
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesfields enclosed by brackets "[]" replaced with your own identifying
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesinformation: Portions Copyright [yyyy] [name of copyright owner]
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesCDDL HEADER END
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesCopyright 2007 Sun Microsystems, Inc. All rights reserved.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesUse is subject to license terms.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesPortions Copyright 2011 Jens Elkner.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes--%><%@ page session="false" errorPage="error.jsp" import="
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes/* ---------------------- help.jsp start --------------------- */
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes cfg = PageConfig.get(request);
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes cfg.setTitle("OpenGrok Help");
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes long lmdate = cfg.getEnv().getConfiguration().getLastModified();
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes if (request.getDateHeader("If-Modified-Since") >= lmdate) {
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes response.setDateHeader("Last-Modified", lmdate);
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <div id="page">
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <div id="whole_header">
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <div id="header"><%@
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <div id="Masthead"></div>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <div id="sbar">
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <div id="menu"><%@
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesinclude file="menu.jspf"
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <div id="help">
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesA <dfn>Query</dfn> is a series of clauses. A clause may be prefixed by:</p>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <li>a plus "<b>+</b>" or a minus "<b>-</b>" sign, indicating that the clause
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes is required or prohibited respectively; or</li>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <li>a <dfn>term</dfn> followed by a colon "<b>:</b>", indicating the
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <dfn>field</dfn> to be searched. This enables one to construct queries
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes which search multiple <dfn>fields</dfn>.</li>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<p>A clause may be either:</p>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <li>a <dfn>term</dfn>, indicating all the documents that contain this term;
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <li>a <dfn>phrase</dfn> - group of words surrounded by double quotes
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <b>" "</b>, e.g. "hello dolly" </li>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <li>a nested query, enclosed in parentheses "<b>(</b>" "<b>)</b>" (also
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg called query/field <dfn>grouping</dfn>) . Note that this may be used
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes with a +/- prefix to require any of a set of terms. </li>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <li>boolean <dfn>operators</dfn> which allow terms to be combined through
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes logic operators. Supported are <b>AND</b>(<b>&&</b>), "<b>+</b>",
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <b>OR</b>(<b>||</b>), <b>NOT</b>(<b>!</b>) and "<b>-</b>" (Note: they
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes must be ALL CAPS).</li>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<p>Wildcard, Fuzzy, Proximity & Range Searches:</p>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <li>to perform a single character wildcard search use the "<b>?</b>" symbol,
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <li>to perform a multiple character wildcard search use the "<b>*</b>"
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes symbol, e.g. test* or te*t</li>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <li>you cannot use a * or ? symbol as the first character of a search
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes (unless enabled using indexer option -a).</li>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <li>to do a fuzzy search(find words similar in spelling, based on the
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes Levenshtein Distance, or Edit Distance algorithm) use the tilde,
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes "<b>~</b>", e.g. rcs~ </li>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <li>to do a proximity search use the tilde, "~", symbol at the end of a
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes Phrase. For example to search for a "opengrok" and "help" within 10
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes words of each other enter: "opengrok help"~10 </li>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <li>range queries allow one to match documents whose field(s) values are
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg between the lower and upper bound specified by the Range Query. Range
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes Queries can be inclusive or exclusive of the upper and lower bounds.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes Sorting is done lexicographically. Inclusive queries are denoted by
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg square brackets <b>[ ]</b> , exclusive by curly brackets <b>{ }</b>.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes For example: title:{Aida TO Carmen} - will find all documents between
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes Aida to Carmen, exclusive of Aida and Carmen. </li>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<a id="escaping"><dfn>Escaping special characters:</dfn></a>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<p>Opengrok supports escaping special characters that are part of the query
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes syntax. Current special characters are:<br/>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <b>+ - && || ! ( ) { } [ ] ^ " ~ * ? : \ </b><br/>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesTo escape these character use the \ before the character. For example to search
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesfor <b>(1+1):2</b> use the query: <b>\(1\+1\)\:2</b>
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg<p>NOTE on analyzers: Indexed words are made up of Alpha-Numeric and Underscore
bb2b38cd44b032118359afbc743efbea12f48e61bnicholescharacters. One letter words are usually not indexed as symbols!<br/>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesMost other characters(including single and double quotes) are treated as
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg"spaces/whitespace"(so even if you escape them, they will not be found, since
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesmost analyzers ignore them). <br/>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesThe exceptions are: <b>@ $ % ^ & = ? . :</b> which are mostly indexed as
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesseparate words.<br/>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesBecause some of them are part of the query syntax, they must be escaped with a
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesreverse slash as noted above.<br/>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesSo searching for <b>\+1</b> or <b>\+ 1</b> will both find <b>+1</b> and <b>+ 1</b>.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<p>valid <dfn>FIELDs</dfn> are</p>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <dl class="fields">
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<dt>full</dt>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<dd>Search through all text tokens(words,strings,identifiers,numbers) in index.</dd>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<dt>defs</dt>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<dd>Only finds symbol definitions.</dd>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<dt>refs</dt>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<dd>Only finds symbols.</dd>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<dt>path</dt>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<dd>path of the source file.</dd>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<dt>hist</dt>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<dd>History log comments.</dd>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesthe term(phrases) can be boosted (making it more relevant) using a caret
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg<b>^</b> , e.g. help^4 opengrok - will make term help boosted
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<dfn><b>Examples:</b></dfn>
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg<pre class="example">
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesTo find where setResourceMonitors is defined: <a
bb2b38cd44b032118359afbc743efbea12f48e61bnicholeshref="search?q=&defs=setResourceMonitors">defs:setResourceMonitors</a>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesTo find files that use sprintf in usr/src/cmd/cmd-inet/usr.sbin/:
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<a href="search?refs=sprintf&path=usr%2Fsrc%2Fcmd%2Fcmd-inet%2Fusr.sbin%2F"
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes>refs:sprintf path:usr/src/cmd/cmd-inet/usr.sbin</a>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesTo find assignments to variable Asign:
405f61494d3ed3ca9c054dacc05a53513e172145bnicholes<a href="search?q=%22asign+%3D+%22">"Asign="</a>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesTo find Makefiles where pstack binary is being built:
8aa5c68ad507ea2ecfba3b7a8fc3359c79310eadbnicholes<a href="search?q=pstack&path=Makefile">pstack path:Makefile</a>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesto search for phrase "Bill Joy":
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<a href="search?q=%22Bill+Joy%22">"Bill Joy"</a>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesTo find perl files that do not use /usr/bin/perl but something else:
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<a href="search?q=-%22%2Fusr%2Fbin%2Fperl%22+%2B%22%2Fbin%2Fperl%22"
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesTo find all strings begining with foo use the wildcard:
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<a href="search?q=foo*">foo*</a>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesTo find all files which have . c in their name(dot is a token!):
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<a href="search?path=%22. c%22">". c"</a>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<p>Opengrok search is powered by <a href="http://lucene.apache.org/"
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes>lucene</a>, for more detail on query syntax refer to lucene docs.</p>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes/* ---------------------- help.jsp end --------------------- */
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesinclude file="foot.jspf"