144N/AThe contents of this file are subject to the terms of the
144N/ACommon Development and Distribution License (the "License").
144N/AYou may not use this file except in compliance with the License.
144N/Alanguage governing permissions and limitations under the License.
144N/AWhen distributing Covered Code, include this CDDL HEADER in each
144N/AIf applicable, add the following below this CDDL HEADER, with the
144N/Afields enclosed by brackets "[]" replaced with your own identifying
144N/Ainformation: Portions Copyright [yyyy] [name of copyright owner]
144N/ACopyright 2007 Sun Microsystems, Inc. All rights reserved.
144N/AUse is subject to license terms.
144N/APortions Copyright 2011 Jens Elkner.
144N/A/* ----------------------
help.jsp start --------------------- */
144N/A<body class="yui3-skin-sam">
144N/A <div id="whole_header">
510N/A <div id="Masthead"></div>
510N/AA <dfn>Query</dfn> is a series of clauses. A clause may be prefixed by:</p>
849N/A <li>a plus "<b>+</b>" or a minus "<b>-</b>" sign, indicating that the clause
510N/A is required or prohibited respectively; or</li>
510N/A <li>a <dfn>term</dfn> followed by a colon "<b>:</b>", indicating the
510N/A <dfn>field</dfn> to be searched. This enables one to construct queries
510N/A which search multiple <dfn>fields</dfn>.</li>
510N/A<p>A clause may be either:</p>
510N/A <li>a <dfn>term</dfn>, indicating all the documents that contain this term;
510N/A <li>a <dfn>phrase</dfn> - group of words surrounded by double quotes
144N/A <li>a nested query, enclosed in parentheses "<b>(</b>" "<b>)</b>" (also
510N/A with a +/- prefix to require any of a set of terms. </li>
510N/A <li>boolean <dfn>operators</dfn> which allow terms to be combined through
510N/A logic operators. Supported are <b>AND</b>(<b>&&</b>), "<b>+</b>",
510N/A <b>OR</b>(<b>||</b>), <b>NOT</b>(<b>!</b>) and "<b>-</b>" (Note: they
144N/A must be ALL CAPS).</li>
510N/A<p>Wildcard, Fuzzy, Proximity & Range Searches:</p>
510N/A <li>to perform a single character wildcard search use the "<b>?</b>" symbol,
144N/A <li>to perform a multiple character wildcard search use the "<b>*</b>"
510N/A <li>you cannot use a * or ? symbol as the first character of a search
510N/A (unless enabled using indexer option -a).</li>
510N/A <li>to do a fuzzy search(find words similar in spelling, based on the
510N/A Levenshtein Distance, or Edit Distance algorithm) use the tilde,
510N/A <li>to do a proximity search use the tilde, "~", symbol at the end of a
510N/A Phrase. For example to search for a "opengrok" and "help" within 10
510N/A words of each other enter: "opengrok help"~10 </li>
510N/A <li>range queries allow one to match documents whose field(s) values are
510N/A between the lower and upper bound specified by the Range Query. Range
510N/A Queries can be inclusive or exclusive of the upper and lower bounds.
510N/A Sorting is done lexicographically. Inclusive queries are denoted by
510N/A square brackets <b>[ ]</b> , exclusive by curly brackets <b>{ }</b>.
510N/A For example: title:{Aida TO Carmen} - will find all documents between
510N/A Aida to Carmen, exclusive of Aida and Carmen. </li>
849N/A<a id="escaping"><dfn>Escaping special characters:</dfn></a>
849N/A<p>Opengrok supports escaping special characters that are part of the query
510N/A syntax. Current special characters are:<br/>
144N/A <b>+ - && || ! ( ) { } [ ] ^ " ~ * ? : \ </b><br/>
510N/ATo escape these character use the \ before the character. For example to search
510N/Afor <b>(1+1):2</b> use the query: <b>\(1\+1\)\:2</b>
144N/A<p>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.</dd>
<dd>Only finds symbols.</dd>
<dd>path of the source file.</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
<dfn><b>Examples:</b></dfn>
To find where setResourceMonitors is defined: <a
href="search?q=&defs=setResourceMonitors">defs:setResourceMonitors</a>
<a href="search?refs=sprintf&path=usr%2Fsrc%2Fcmd%2Fcmd-inet%
2Fusr.sbin%2F"
To find assignments to variable Asign:
<a href="search?q=%22asign+%3D+%22">"Asign="</a>
To find Makefiles where pstack binary is being built:
<a href="search?q=pstack&path=Makefile">pstack path:Makefile</a>
to search for phrase "Bill Joy":
<a href="search?q=%22Bill+Joy%22">"Bill Joy"</a>
To find perl files that do not use
/usr/bin/perl but something else:
<a href="search?q=-%22%2Fusr%2Fbin%2Fperl%22+%2B%22%2Fbin%2Fperl%22"
To find all strings begining 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>
>lucene</a>, for more detail on query syntax refer to lucene docs.</p>
/* ----------------------
help.jsp end --------------------- */