help.jsp revision 849
1281N/A<%--
144N/ACDDL HEADER START
144N/A
144N/AThe contents of this file are subject to the terms of the
1281N/ACommon Development and Distribution License (the "License").
144N/AYou may not use this file except in compliance with the License.
144N/A
144N/ASee LICENSE.txt included in this distribution for the specific
144N/Alanguage governing permissions and limitations under the License.
144N/A
144N/AWhen distributing Covered Code, include this CDDL HEADER in each
144N/Afile and include the License file at LICENSE.txt.
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/A
144N/ACDDL HEADER END
144N/A
144N/ACopyright 2007 Sun Microsystems, Inc. All rights reserved.
144N/AUse is subject to license terms.
144N/A
1186N/A--%><%@ page import = "org.opensolaris.opengrok.configuration.RuntimeEnvironment"
1186N/A session="false" errorPage="error.jsp" %><%
1186N/ARuntimeEnvironment environment = RuntimeEnvironment.getInstance();
1186N/Aenvironment.register();
1186N/AString pageTitle = "OpenGrok Help";
1186N/A%><%@ include file="httpheader.jspf" %>
1186N/A<body>
1281N/A <div id="page">
1281N/A <div id="header"><%@ include file="pageheader.jspf" %> </div>
1330N/A <div id="Masthead"></div>
1330N/A <div id="bar">
1330N/A <table cellpadding="0" cellspacing="0" border="0" width="100%">
1330N/A <tr><td valign="top"><br /> &nbsp;</td><td align="left" valign="middle"><br/>
1330N/A <form action="search" name="sbox">
1330N/A <table cellpadding="2" border="0" cellspacing="0">
1186N/A <tr><td align="right"> Full&nbsp;Search (q) </td><td><input class="q" name="q" size="45" value=""/></td></tr>
1186N/A <tr><td align="right"> Definition (defs) </td><td><input class="q" name="defs" size="25" value=""/></td></tr>
1186N/A <tr><td align="right"> Symbol (refs) </td><td><input class="q" name="refs" size="25" value=""/></td></tr>
1186N/A <tr><td align="right"> File&nbsp;Path (path) </td><td><input class="q" name="path" size="25" value=""/></td></tr>
1186N/A <tr><td align="right"> History (hist) </td><td><input class="q" name="hist" size="25" value=""/></td></tr>
1364N/A <tr><td></td><td> &nbsp; <input class="submit" type="submit" value=" Search "/> | <input class="submit" onClick="document.sbox.q.value='';document.sbox.defs.value='';document.sbox.refs.value='';document.sbox.path.value='';document.sbox.hist.value='';" type="button" value=" Clear "/></td></tr>
1281N/A </table>
1281N/A </form>
1281N/A </td></tr></table>
1186N/A </div>
1186N/A <div id="results"><p>
1186N/A A <u>Query</u> is a series of clauses. A clause may be prefixed by:
1281N/A <ul>
1281N/A <li>a plus "<b>+</b>" or a minus "<b>-</b>" sign, indicating that the clause is required or prohibited respectively; or</li>
1281N/A <li>a <u>term</u> followed by a colon "<b>:</b>", indicating the <u>field</u> to be searched. This enables one to construct queries which search multiple <u>fields</u>.</li>
1281N/A </ul>
1281N/A A clause may be either:
1281N/A <ul>
1186N/A <li> a <u>term</u>, indicating all the documents that contain this term; or</li>
1186N/A <li> a <u>phrase</u> - group of words surrounded by double quotes <b>" "</b>, e.g. "hello dolly" </li>
1186N/A <li> a nested query, enclosed in parentheses "<b>(</b>" "<b>)</b>" (also called query/field <u>grouping</u>) . Note that this may be used with a +/- prefix to require any of a set of terms. </li>
1281N/A <li> boolean <u>operators</u> which allow terms to be combined through logic operators. Supported are <b>AND</b>(<b>&&</b>), "<b>+</b>", <b>OR</b>(<b>||</b>), <b>NOT</b>(<b>!</b>) and "<b>-</b>" (Note: they must be ALL CAPS).</li>
1281N/A </ul>
1281N/A Wildcard, Fuzzy, Proximity & Range Searches:
1186N/A <ul>
1186N/A <li> to perform a single character wildcard search use the "<b>?</b>" symbol, e.g. te?t</li>
1186N/A <li> to perform a multiple character wildcard search use the "<b>*</b>" symbol, e.g. test* or te*t</li>
1281N/A <li> you cannot use a * or ? symbol as the first character of a search (unless enabled using indexer option -a).</li>
1281N/A <li> to do a fuzzy search(find words similar in spelling, based on the Levenshtein Distance, or Edit Distance algorithm) use the tilde, "<b>~</b>", e.g. rcs~ </li>
1281N/A <li> to do a proximity search use the tilde, "~", symbol at the end of a Phrase. For example to search for a "opengrok" and "help" within 10 words of each other enter: "opengrok help"~10 </li>
1281N/A <li> range queries allow one to match documents whose field(s) values are between the lower and upper bound specified by the Range Query. Range Queries can be inclusive or exclusive of the upper and lower bounds. Sorting is done lexicographically. Inclusive queries are denoted by square brackets <b>[ ]</b> , exclusive by curly brackets <b>{ }</b>. For example: title:{Aida TO Carmen} - will find all documents between Aida to Carmen, exclusive of Aida and Carmen. </li>
1281N/A </ul>
1186N/A
1186N/A <a name="escaping"><u>Escaping special characters:</u></a>
1186N/A <p>Opengrok supports escaping special characters that are part of the query syntax. The current list special characters are:<br/>
1281N/A <b>+ - &amp;&amp; || ! ( ) { } [ ] ^ " ~ * ? : \ </b><br/>
1281N/A To escape these character use the \ before the character. For example to search for (1+1):2 use the query: \(1\+1\)\:2</p>
1281N/A
1281N/A valid <u>FIELDs</u> are
1281N/A <pre>
1281N/A <b>full:</b> Full text search.
1281N/A <b>defs:</b> Only finds symbol definitions.
1281N/A <b>refs:</b> Only finds symbols.
1281N/A <b>path:</b> path of the source file.
1281N/A <b>hist:</b> History log comments
1281N/A </pre>
1186N/A <p>
1186N/A 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
1186N/A </p>
1281N/A <u><b>Examples:</b></u>
1281N/A <pre>
1281N/A
1281N/A To find where setResourceMonitors is defined
1281N/A <a href="search?q=&defs=setResourceMonitors">defs:setResourceMonitors</a>
1281N/A
1281N/A To find files that use sprintf in usr/src/cmd/cmd-inet/usr.sbin/
1281N/A <a href="search?refs=sprintf&path=usr%2Fsrc%2Fcmd%2Fcmd-inet%2Fusr.sbin%2F">refs:sprintf path:usr/src/cmd/cmd-inet/usr.sbin</a>
1281N/A
1281N/A To find assignments to variable Asign
1281N/A <a href="search?q=%22asign+%3D+%22">"Asign="</a>
1281N/A
1281N/A To find Makefiles where pstack binary is being built
1281N/A <a href="search?q=pstack&path=Makefile">pstack path:Makefile</a>
1281N/A
1281N/A to search for phrase "Bill Joy":
1281N/A <a href="search?q=%22Bill+Joy%22">"Bill Joy"</a>
1281N/A
1281N/A To find perl files that do not use /usr/bin/perl but something else,
1186N/A <a href="search?q=-%22%2Fusr%2Fbin%2Fperl%22+%2B%22%2Fbin%2Fperl%22">-"/usr/bin/perl" +"/bin/perl"</a>
1281N/A
1186N/A To find all strings begining with foo use the wildcard,
1281N/A <a href="search?q=foo*">foo*</a>
1281N/A </pre>
1186N/A
1281N/A <p>Opengrok search is powered by <a href="http://lucene.apache.org/">lucene</a>, for more detail on query syntax refer to lucene docs.</p>
1186N/A </p>
1281N/A </div>
1281N/A <%@include file="foot.jspf"%>
1186N/A