help.jsp revision 689c2c8d7d285f355a90f35469326d5e51777042
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsyncCDDL HEADER START
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsyncThe contents of this file are subject to the terms of the
f6fd812d35e1100931d67e2f37b0e54ec3e91c6avboxsyncCommon Development and Distribution License (the "License").
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsyncYou may not use this file except in compliance with the License.
d15cb592695d8e53000e073174446c952d5c3d24vboxsyncSee LICENSE.txt included in this distribution for the specific
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsynclanguage governing permissions and limitations under the License.
92a27575521748a392dcd1b996fce55b87411a00vboxsyncWhen distributing Covered Code, include this CDDL HEADER in each
92a27575521748a392dcd1b996fce55b87411a00vboxsyncfile and include the License file at LICENSE.txt.
92a27575521748a392dcd1b996fce55b87411a00vboxsyncIf applicable, add the following below this CDDL HEADER, with the
92a27575521748a392dcd1b996fce55b87411a00vboxsyncfields enclosed by brackets "[]" replaced with your own identifying
92a27575521748a392dcd1b996fce55b87411a00vboxsyncinformation: Portions Copyright [yyyy] [name of copyright owner]
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsyncCDDL HEADER END
c9dbeac49601b9e10f0941b1c8e4f97853d4fab5vboxsyncCopyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
c9dbeac49601b9e10f0941b1c8e4f97853d4fab5vboxsyncUse is subject to license terms.
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsyncPortions Copyright 2011 Jens Elkner.
8014e6b48074410debfa96f8e6d8a2450b324e9evboxsync--%><%@ page session="false" errorPage="error.jsp" import="
8014e6b48074410debfa96f8e6d8a2450b324e9evboxsync/* ---------------------- help.jsp start --------------------- */
b8908d384db2324f04a2f68a13e67ea32ebf609avboxsync cfg = PageConfig.get(request);
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync cfg.setTitle("OpenGrok Help");
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync <div id="page">
cd0df93c493ca3ecfbe176006162927fd5fd519bvboxsync <div id="whole_header">
cd0df93c493ca3ecfbe176006162927fd5fd519bvboxsync <div id="header"><%@
cd0df93c493ca3ecfbe176006162927fd5fd519bvboxsync <div id="Masthead"></div>
16aeb8f83239d4a4a10ecac1fb46fe24a8bdbb66vboxsync <div id="sbar">
16aeb8f83239d4a4a10ecac1fb46fe24a8bdbb66vboxsync <div id="menu"><%@
48f33dfd8f615d457106bf76ae2d09b8b9167c1avboxsyncinclude file="menu.jspf"
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync <div id="help">
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync<h4>Examples:</h4>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync<pre class="example">
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsyncTo find where setResourceMonitors is defined:
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync<a href="search?q=&defs=setResourceMonitors">defs:setResourceMonitors</a>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsyncTo find files that use sprintf in usr/src/cmd/cmd-inet/usr.sbin/:
dae455cdc8bed1907d3e95d54e735b1568cd8aacvboxsync<a href="search?refs=sprintf&path=usr%2Fsrc%2Fcmd%2Fcmd-inet%2Fusr.sbin%2F"
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync>refs:sprintf path:usr/src/cmd/cmd-inet/usr.sbin</a>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsyncTo find assignments to variable foo:
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync<a href="search?q=%22foo+%3D%22">"foo ="</a>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsyncTo find Makefiles where pstack binary is being built:
3196a540aa11c41264b0e79857b879e4ab566f4bvboxsync<a href="search?q=pstack&path=Makefile">pstack path:Makefile</a>
3196a540aa11c41264b0e79857b879e4ab566f4bvboxsyncto search for phrase "Bill Joy":
640a016242d9b866deca0719c22f56d911c5ecb5vboxsync<a href="search?q=%22Bill+Joy%22">"Bill Joy"</a>
3196a540aa11c41264b0e79857b879e4ab566f4bvboxsyncTo find perl files that do not use /usr/bin/perl but something else:
3196a540aa11c41264b0e79857b879e4ab566f4bvboxsync<a href="search?q=-%22%2Fusr%2Fbin%2Fperl%22+%2B%22%2Fbin%2Fperl%22"
48f33dfd8f615d457106bf76ae2d09b8b9167c1avboxsyncTo find all strings beginning with foo use the wildcard:
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync<a href="search?q=foo*">foo*</a>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsyncTo find all files which have . c in their name (dot is a token!):
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync<a href="search?path=%22. c%22">". c"</a>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsyncTo find all files which start with "ma" and then have only alphabet characters do:
d15cb592695d8e53000e073174446c952d5c3d24vboxsync<a href="search?path=/ma[a-zA-Z]*/">path:/ma[a-zA-Z]*/</a>
d15cb592695d8e53000e073174446c952d5c3d24vboxsyncTo find all main methods in all files analyzed by C analyzer (so .c, .h, ...) do:
d15cb592695d8e53000e073174446c952d5c3d24vboxsync<a href="search?q=main&type=c">main type:c</a>
d15cb592695d8e53000e073174446c952d5c3d24vboxsync<h4>More info:</h4>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsyncA <dfn>Query</dfn> is a series of clauses. A clause may be prefixed by:</p>
d15cb592695d8e53000e073174446c952d5c3d24vboxsync <li>a plus "<b>+</b>" or a minus "<b>-</b>" sign, indicating that the clause
d15cb592695d8e53000e073174446c952d5c3d24vboxsync is required or prohibited respectively; or</li>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync <li>a <dfn>term</dfn> followed by a colon "<b>:</b>", indicating the
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync <dfn>field</dfn> to be searched. This enables one to construct queries
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync which search multiple <dfn>fields</dfn>.</li>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync<p>A <dfn>clause</dfn> may be either:</p>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync <li>a <dfn>term</dfn>, indicating all the documents that contain this term;
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync <li>a <dfn>phrase</dfn> - group of words surrounded by double quotes
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync <b>" "</b>, e.g. "hello dolly" </li>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync <li>a nested query, enclosed in parentheses "<b>(</b>" "<b>)</b>" (also
d15cb592695d8e53000e073174446c952d5c3d24vboxsync called query/field <dfn>grouping</dfn>) . Note that this may be used
d15cb592695d8e53000e073174446c952d5c3d24vboxsync with a +/- prefix to require any of a set of terms. </li>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync <li>boolean <dfn>operators</dfn> which allow terms to be combined through
f6fd812d35e1100931d67e2f37b0e54ec3e91c6avboxsync logic operators. Supported are <b>AND</b>(<b>&&</b>), "<b>+</b>",
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync <b>OR</b>(<b>||</b>), <b>NOT</b>(<b>!</b>) and "<b>-</b>" (Note: they
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync must be ALL CAPS).</li>
d15cb592695d8e53000e073174446c952d5c3d24vboxsync<p>Regular Expression, Wildcard, Fuzzy, Proximity & Range Searches:</p>
d15cb592695d8e53000e073174446c952d5c3d24vboxsync <li>to perform a regular expression search use the "<b>/</b>" enclosure,
d15cb592695d8e53000e073174446c952d5c3d24vboxsync e.g. /[mb]an/ - will search for man or for ban;<br>
d15cb592695d8e53000e073174446c952d5c3d24vboxsync NOTE: path field search escapes "/" by default, so it only supports
48f33dfd8f615d457106bf76ae2d09b8b9167c1avboxsync regexps when the search string <u>starts and ends</u> with "/".<br>
48f33dfd8f615d457106bf76ae2d09b8b9167c1avboxsync More info can be found on <a href="http://lucene.apache.org/core/4_5_1/core/org/apache/lucene/util/automaton/RegExp.html?is-external=true">lucene regexp page</a>.
d15cb592695d8e53000e073174446c952d5c3d24vboxsync <li>to perform a single character wildcard search use the "<b>?</b>" symbol,
d15cb592695d8e53000e073174446c952d5c3d24vboxsync <li>to perform a multiple character wildcard search use the "<b>*</b>"
d15cb592695d8e53000e073174446c952d5c3d24vboxsync symbol, e.g. test* or te*t</li>
d15cb592695d8e53000e073174446c952d5c3d24vboxsync <li>you can use a * or ? symbol as the first character of a search
d15cb592695d8e53000e073174446c952d5c3d24vboxsync (unless not enabled using indexer option -a).</li>
d15cb592695d8e53000e073174446c952d5c3d24vboxsync <li>to do a fuzzy search (find words similar in spelling, based on the
48f33dfd8f615d457106bf76ae2d09b8b9167c1avboxsync Levenshtein Distance, or Edit Distance algorithm) use the tilde,
48f33dfd8f615d457106bf76ae2d09b8b9167c1avboxsync "<b>~</b>", e.g. rcs~ </li>
d15cb592695d8e53000e073174446c952d5c3d24vboxsync <li>to do a proximity search use the tilde, "~", symbol at the end of a
d15cb592695d8e53000e073174446c952d5c3d24vboxsync Phrase. For example to search for a "opengrok" and "help" within 10
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync words of each other enter: "opengrok help"~10 </li>
d15cb592695d8e53000e073174446c952d5c3d24vboxsync <li>range queries allow one to match documents whose field(s) values are
48f33dfd8f615d457106bf76ae2d09b8b9167c1avboxsync between the lower and upper bound specified by the Range Query. Range
d15cb592695d8e53000e073174446c952d5c3d24vboxsync Queries can be inclusive or exclusive of the upper and lower bounds.
d15cb592695d8e53000e073174446c952d5c3d24vboxsync Sorting is done lexicographically. Inclusive queries are denoted by
d15cb592695d8e53000e073174446c952d5c3d24vboxsync square brackets <b>[ ]</b> , exclusive by curly brackets <b>{ }</b>.
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync For example: title:{Aida TO Carmen} - will find all documents between
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync Aida to Carmen, exclusive of Aida and Carmen. </li>
cd7cb5842fc6cb8c8b5a7190aae44b270a4abf24vboxsync<a id="escaping"><dfn>Escaping special characters:</dfn></a>
cd7cb5842fc6cb8c8b5a7190aae44b270a4abf24vboxsync<p>Opengrok supports escaping special characters that are part of the query
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync syntax. Current special characters are:<br/>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync <b>+ - && || ! ( ) { } [ ] ^ " ~ * ? : \ / </b><br/>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsyncTo escape these character use the \ before the character. For example to search
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsyncfor <b>(1+1):2</b> use the query: <b>\(1\+1\)\:2</b>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync<p>NOTE on analyzers: Indexed words are made up of Alpha-Numeric and Underscore
45b859e36574b2ec240223564ad0f045bf71c283vboxsynccharacters. One letter words are usually not indexed as symbols!<br/>
45b859e36574b2ec240223564ad0f045bf71c283vboxsyncMost other characters (including single and double quotes) are treated as
d15cb592695d8e53000e073174446c952d5c3d24vboxsync"spaces/whitespace" (so even if you escape them, they will not be found, since
45b859e36574b2ec240223564ad0f045bf71c283vboxsyncmost analyzers ignore them). <br/>
deb20978ac494bbd4fbd7722912f8acd3c395999vboxsyncThe exceptions are: <b>@ $ % ^ & = ? . :</b> which are mostly indexed as
d15cb592695d8e53000e073174446c952d5c3d24vboxsyncseparate words.<br/>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsyncBecause some of them are part of the query syntax, they must be escaped with a
b225af96d6fafe422a484b75f9199c784459e8d2vboxsyncreverse slash as noted above.<br/>
d15cb592695d8e53000e073174446c952d5c3d24vboxsyncSo searching for <b>\+1</b> or <b>\+ 1</b> will both find <b>+1</b> and <b>+ 1</b>.
8014e6b48074410debfa96f8e6d8a2450b324e9evboxsync<p>Valid <dfn>FIELDs</dfn> are</p>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync <dl class="fields">
d15cb592695d8e53000e073174446c952d5c3d24vboxsync<dt>full</dt>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync<dd>Search through all text tokens (words,strings,identifiers,numbers) in index.</dd>
d15cb592695d8e53000e073174446c952d5c3d24vboxsync<dt>defs</dt>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync<dd>Only finds symbol definitions (where e.g. a variable (function, ...) is defined).</dd>
d15cb592695d8e53000e073174446c952d5c3d24vboxsync<dt>refs</dt>
448f1d79a108cda5df9224fc9b2b578c2c83c8favboxsync<dd>Only finds symbols (e.g. methods, classes, functions, variables).</dd>
d15cb592695d8e53000e073174446c952d5c3d24vboxsync<dt>path</dt>
45b859e36574b2ec240223564ad0f045bf71c283vboxsync<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>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync<dt>hist</dt>
45b859e36574b2ec240223564ad0f045bf71c283vboxsync<dd>History log comments.</dd>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync<dt>type</dt>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync<dd>Type of analyzer used to scope down to certain file types (e.g. just C sources).<br/>Current mappings: <%=SearchHelper.getFileTypeDescriptions().toString()%></dd>
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsyncThe term (phrases) can be boosted (making it more relevant) using a caret
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsync<b>^</b> , e.g. help^4 opengrok - will make term help boosted
48f33dfd8f615d457106bf76ae2d09b8b9167c1avboxsync<p>Opengrok search is powered by <a href="http://lucene.apache.org/"
48f33dfd8f615d457106bf76ae2d09b8b9167c1avboxsync>lucene</a>, for 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>.<br>
48f33dfd8f615d457106bf76ae2d09b8b9167c1avboxsync/* ---------------------- help.jsp end --------------------- */
db3dbd0ed7eb69f804a8921fa23a1267ea01f46evboxsyncinclude file="foot.jspf"