help.jsp revision 14a41f02433890d19b2f871156271e3388cd0845
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeCDDL HEADER START
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeThe contents of this file are subject to the terms of the
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeCommon 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
c0550b01024b910b8c1468811c0ea663b10b1372Trond NorbyeCopyright 2007 Sun Microsystems, Inc. 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 --------------------- */
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner cfg = PageConfig.get(request);
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner cfg.setTitle("OpenGrok Help");
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <div id="page">
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <div id="whole_header">
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <div id="header"><%@
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <div id="Masthead"></div>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <div id="sbar">
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <div id="menu"><%@
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerinclude file="menu.jspf"
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <div id="help">
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerA <dfn>Query</dfn> is a series of clauses. A clause may be prefixed by:</p>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <li>a plus "<b>+</b>" or a minus "<b>-</b>" sign, indicating that the clause
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner is required or prohibited respectively; or</li>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <li>a <dfn>term</dfn> followed by a colon "<b>:</b>", indicating the
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <dfn>field</dfn> to be searched. This enables one to construct queries
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner which search multiple <dfn>fields</dfn>.</li>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<p>A clause may be either:</p>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <li>a <dfn>term</dfn>, indicating all the documents that contain this term;
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <li>a <dfn>phrase</dfn> - group of words surrounded by double quotes
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <b>" "</b>, e.g. "hello dolly" </li>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <li>a nested query, enclosed in parentheses "<b>(</b>" "<b>)</b>" (also
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner called query/field <dfn>grouping</dfn>) . Note that this may be used
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner with a +/- prefix to require any of a set of terms. </li>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <li>boolean <dfn>operators</dfn> which allow terms to be combined through
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner logic operators. Supported are <b>AND</b>(<b>&&</b>), "<b>+</b>",
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <b>OR</b>(<b>||</b>), <b>NOT</b>(<b>!</b>) and "<b>-</b>" (Note: they
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner must be ALL CAPS).</li>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<p>Wildcard, Fuzzy, Proximity & Range Searches:</p>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <li>to perform a single character wildcard search use the "<b>?</b>" symbol,
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <li>to perform a multiple character wildcard search use the "<b>*</b>"
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner symbol, e.g. test* or te*t</li>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <li>you cannot use a * or ? symbol as the first character of a search
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner (unless enabled using indexer option -a).</li>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <li>to do a fuzzy search(find words similar in spelling, based on the
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner Levenshtein Distance, or Edit Distance algorithm) use the tilde,
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner "<b>~</b>", e.g. rcs~ </li>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <li>to do a proximity search use the tilde, "~", symbol at the end of a
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner Phrase. For example to search for a "opengrok" and "help" within 10
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner words of each other enter: "opengrok help"~10 </li>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <li>range queries allow one to match documents whose field(s) values are
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner between the lower and upper bound specified by the Range Query. Range
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner Queries can be inclusive or exclusive of the upper and lower bounds.
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner Sorting is done lexicographically. Inclusive queries are denoted by
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner square brackets <b>[ ]</b> , exclusive by curly brackets <b>{ }</b>.
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner For example: title:{Aida TO Carmen} - will find all documents between
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner Aida to Carmen, exclusive of Aida and Carmen. </li>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<a id="escaping"><dfn>Escaping special characters:</dfn></a>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<p>Opengrok supports escaping special characters that are part of the query
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner syntax. Current special characters are:<br/>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <b>+ - && || ! ( ) { } [ ] ^ " ~ * ? : \ </b><br/>
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerTo escape these character use the \ before the character. For example to search
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerfor <b>(1+1):2</b> use the query: <b>\(1\+1\)\:2</b>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<p>NOTE on analyzers: Indexed words are made up of Alpha-Numeric and Underscore
14a41f02433890d19b2f871156271e3388cd0845Jens Elknercharacters. One letter words are usually not indexed as symbols!<br/>
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerMost other characters(including single and double quotes) are treated as
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner"spaces/whitespace"(so even if you escape them, they will not be found, since
14a41f02433890d19b2f871156271e3388cd0845Jens Elknermost analyzers ignore them). <br/>
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerThe exceptions are: <b>@ $ % ^ & = ? . :</b> which are mostly indexed as
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerseparate words.<br/>
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerBecause some of them are part of the query syntax, they must be escaped with a
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerreverse slash as noted above.<br/>
e655c7911217c7948ee6d9eb73bff3a712b0fa70Lubos KoscoSo searching for <b>\+1</b> or <b>\+ 1</b> will both find <b>+1</b> and <b>+ 1</b>.
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<p>valid <dfn>FIELDs</dfn> are</p>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner <dl class="fields">
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dt>full</dt>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dd>Search through all text tokens(words,strings,identifiers,numbers) in index.</dd>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dt>defs</dt>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dd>Only finds symbol definitions.</dd>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dt>refs</dt>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dd>Only finds symbols.</dd>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dt>path</dt>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dd>path of the source file.</dd>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dt>hist</dt>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dd>History log comments.</dd>
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerthe term(phrases) can be boosted (making it more relevant) using a caret
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<b>^</b> , e.g. help^4 opengrok - will make term help boosted
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<dfn><b>Examples:</b></dfn>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<pre class="example">
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerTo find where setResourceMonitors is defined: <a
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerhref="search?q=&defs=setResourceMonitors">defs:setResourceMonitors</a>
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerTo find files that use sprintf in usr/src/cmd/cmd-inet/usr.sbin/:
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<a href="search?refs=sprintf&path=usr%2Fsrc%2Fcmd%2Fcmd-inet%2Fusr.sbin%2F"
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner>refs:sprintf path:usr/src/cmd/cmd-inet/usr.sbin</a>
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerTo find assignments to variable Asign:
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<a href="search?q=%22asign+%3D+%22">"Asign="</a>
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerTo find Makefiles where pstack binary is being built:
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<a href="search?q=pstack&path=Makefile">pstack path:Makefile</a>
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerto search for phrase "Bill Joy":
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<a href="search?q=%22Bill+Joy%22">"Bill Joy"</a>
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerTo find perl files that do not use /usr/bin/perl but something else:
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<a href="search?q=-%22%2Fusr%2Fbin%2Fperl%22+%2B%22%2Fbin%2Fperl%22"
14a41f02433890d19b2f871156271e3388cd0845Jens ElknerTo find all strings begining with foo use the wildcard:
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<a href="search?q=foo*">foo*</a>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner<p>Opengrok search is powered by <a href="http://lucene.apache.org/"
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner>lucene</a>, for more detail on query syntax refer to lucene docs.</p>
14a41f02433890d19b2f871156271e3388cd0845Jens Elkner/* ---------------------- help.jsp end --------------------- */
14a41f02433890d19b2f871156271e3388cd0845Jens Elknerinclude file="foot.jspf"