package-summary.html

来自「 Lucene是apache软件基金会[4] jakarta项目组的一个子项目」· HTML 代码 · 共 796 行 · 第 1/3 页

HTML
796
字号
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/PrefixQuery.html" title="class in org.apache.lucene.search">PrefixQuery</A></B></TD>
<TD>A Query that matches documents containing terms with a specified prefix.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/Query.html" title="class in org.apache.lucene.search">Query</A></B></TD>
<TD>The abstract base class for queries.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/QueryFilter.html" title="class in org.apache.lucene.search">QueryFilter</A></B></TD>
<TD>Constrains search results to only match those which also match a provided query.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/QueryTermVector.html" title="class in org.apache.lucene.search">QueryTermVector</A></B></TD>
<TD>&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/RangeFilter.html" title="class in org.apache.lucene.search">RangeFilter</A></B></TD>
<TD>A Filter that restricts search results to a range of values in a given field.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/RangeQuery.html" title="class in org.apache.lucene.search">RangeQuery</A></B></TD>
<TD>A Query that matches documents within an exclusive range.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/RemoteSearchable.html" title="class in org.apache.lucene.search">RemoteSearchable</A></B></TD>
<TD>A remote searchable implementation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/ReqExclScorer.html" title="class in org.apache.lucene.search">ReqExclScorer</A></B></TD>
<TD>A Scorer for queries with a required subscorer and an excluding (prohibited) subscorer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/ReqOptSumScorer.html" title="class in org.apache.lucene.search">ReqOptSumScorer</A></B></TD>
<TD>A Scorer for queries with a required part and an optional part.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/ScoreDoc.html" title="class in org.apache.lucene.search">ScoreDoc</A></B></TD>
<TD>Expert: Returned by low-level search implementations.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/Scorer.html" title="class in org.apache.lucene.search">Scorer</A></B></TD>
<TD>Expert: Common scoring functionality for different types of queries.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/Searcher.html" title="class in org.apache.lucene.search">Searcher</A></B></TD>
<TD>An abstract base class for search implementations.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/Similarity.html" title="class in org.apache.lucene.search">Similarity</A></B></TD>
<TD>Expert: Scoring API.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/SimilarityDelegator.html" title="class in org.apache.lucene.search">SimilarityDelegator</A></B></TD>
<TD>Expert: Delegating scoring implementation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/Sort.html" title="class in org.apache.lucene.search">Sort</A></B></TD>
<TD>Encapsulates sort criteria for returned hits.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/SortComparator.html" title="class in org.apache.lucene.search">SortComparator</A></B></TD>
<TD>Abstract base class for sorting hits returned by a Query.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/SortField.html" title="class in org.apache.lucene.search">SortField</A></B></TD>
<TD>Stores information about how to sort documents by terms in an individual field.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/TermQuery.html" title="class in org.apache.lucene.search">TermQuery</A></B></TD>
<TD>A Query that matches documents containing a term.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/TopDocCollector.html" title="class in org.apache.lucene.search">TopDocCollector</A></B></TD>
<TD>A <A HREF="../../../../org/apache/lucene/search/HitCollector.html" title="class in org.apache.lucene.search"><CODE>HitCollector</CODE></A> implementation that collects the top-scoring documents, returning them as a <A HREF="../../../../org/apache/lucene/search/TopDocs.html" title="class in org.apache.lucene.search"><CODE>TopDocs</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/TopDocs.html" title="class in org.apache.lucene.search">TopDocs</A></B></TD>
<TD>Expert: Returned by low-level search implementations.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/TopFieldDocCollector.html" title="class in org.apache.lucene.search">TopFieldDocCollector</A></B></TD>
<TD>A <A HREF="../../../../org/apache/lucene/search/HitCollector.html" title="class in org.apache.lucene.search"><CODE>HitCollector</CODE></A> implementation that collects the top-sorting documents, returning them as a <A HREF="../../../../org/apache/lucene/search/TopFieldDocs.html" title="class in org.apache.lucene.search"><CODE>TopFieldDocs</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/TopFieldDocs.html" title="class in org.apache.lucene.search">TopFieldDocs</A></B></TD>
<TD>Expert: Returned by low-level sorted search implementations.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/WildcardQuery.html" title="class in org.apache.lucene.search">WildcardQuery</A></B></TD>
<TD>Implements the wildcard search query.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/WildcardTermEnum.html" title="class in org.apache.lucene.search">WildcardTermEnum</A></B></TD>
<TD>Subclass of FilteredTermEnum for enumerating all terms that match the specified wildcard filter term.</TD>
</TR>
</TABLE>
&nbsp;

<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Exception Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../org/apache/lucene/search/BooleanQuery.TooManyClauses.html" title="class in org.apache.lucene.search">BooleanQuery.TooManyClauses</A></B></TD>
<TD>Thrown when an attempt is made to add more than <A HREF="../../../../org/apache/lucene/search/BooleanQuery.html#getMaxClauseCount()"><CODE>BooleanQuery.getMaxClauseCount()</CODE></A> clauses.</TD>
</TR>
</TABLE>
&nbsp;

<P>
<A NAME="package_description"><!-- --></A><H2>
Package org.apache.lucene.search Description
</H2>

<P>
<h2>Table Of Contents</h2><p>    <ol>        <li><a href="#search">Search Basics</a></li>        <li><a href="#query">The Query Classes</a></li>        <li><a href="#scoring">Changing the Scoring</a></li>    </ol></p><a name="search"></a><h2>Search</h2><p>Search over indices.Applications usually call <A HREF="../../../../org/apache/lucene/search/Searcher.html#search(org.apache.lucene.search.Query)"><CODE>Searcher.search(Query)</CODE></A> or <A HREF="../../../../org/apache/lucene/search/Searcher.html#search(org.apache.lucene.search.Query, org.apache.lucene.search.Filter)"><CODE>Searcher.search(Query,Filter)</CODE></A>.    <!-- FILL IN MORE HERE -->   </p><a name="query"></a><h2>Query Classes</h2><h4>    <a href="TermQuery.html">TermQuery</a></h4><p>Of the various implementations of    <a href="Query.html">Query</a>, the    <a href="TermQuery.html">TermQuery</a>    is the easiest to understand and the most often used in applications. A <a        href="TermQuery.html">TermQuery</a> matches all the documents that contain the    specified    <a href="../index/Term.html">Term</a>,    which is a word that occurs in a certain    <a href="../document/Field.html">Field</a>.    Thus, a <a href="TermQuery.html">TermQuery</a> identifies and scores all    <a href="../document/Document.html">Document</a>s that have a <a        href="../document/Field.html">Field</a> with the specified string in it.    Constructing a <a        href="TermQuery.html">TermQuery</a>    is as simple as:    <pre>        TermQuery tq = new TermQuery(new Term("fieldName", "term");    </pre>In this example, the <a href="Query.html">Query</a> identifies all <a        href="../document/Document.html">Document</a>s that have the <a        href="../document/Field.html">Field</a> named <tt>"fieldName"</tt> and    contain the word <tt>"term"</tt>.</p><h4>    <a href="BooleanQuery.html">BooleanQuery</a></h4><p>Things start to get interesting when one combines multiple    <a href="TermQuery.html">TermQuery</a> instances into a <a        href="BooleanQuery.html">BooleanQuery</a>.    A <a href="BooleanQuery.html">BooleanQuery</a> contains multiple    <a href="BooleanClause.html">BooleanClause</a>s,    where each clause contains a sub-query (<a href="Query.html">Query</a>    instance) and an operator (from <a        href="BooleanClause.Occur.html">BooleanClause.Occur</a>)    describing how that sub-query is combined with the other clauses:    <ol>        <li><p>SHOULD -- Use this operator when a clause can occur in the result set, but is not required.            If a query is made up of all SHOULD clauses, then every document in the result            set matches at least one of these clauses.</p></li>        <li><p>MUST -- Use this operator when a clause is required to occur in the result set. Every            document in the result set will match            all such clauses.</p></li>        <li><p>MUST NOT -- Use this operator when a            clause must not occur in the result set. No            document in the result set will match            any such clauses.</p></li>    </ol>    Boolean queries are constructed by adding two or more    <a href="BooleanClause.html">BooleanClause</a>    instances. If too many clauses are added, a <a href="BooleanQuery.TooManyClauses.html">TooManyClauses</a>    exception will be thrown during searching. This most often occurs    when a <a href="Query.html">Query</a>    is rewritten into a <a href="BooleanQuery.html">BooleanQuery</a> with many    <a href="TermQuery.html">TermQuery</a> clauses,    for example by <a href="WildcardQuery.html">WildcardQuery</a>.    The default setting for the maximum number    of clauses 1024, but this can be changed via the    static method <a href="BooleanQuery.html#setMaxClauseCount(int)">setMaxClauseCount</a>    in <a href="BooleanQuery.html">BooleanQuery</a>.</p><h4>Phrases</h4><p>Another common search is to find documents containing certain phrases. This    is handled in two different ways.    <ol>        <li>            <p><a href="PhraseQuery.html">PhraseQuery</a>                -- Matches a sequence of                <a href="../index/Term.html">Terms</a>.                <a href="PhraseQuery.html">PhraseQuery</a> uses a slop factor to determine                how many positions may occur between any two terms in the phrase and still be considered a match.</p>        </li>        <li>            <p><a href="spans/SpanNearQuery.html">SpanNearQuery</a>                -- Matches a sequence of other                <a href="spans/SpanQuery.html">SpanQuery</a>                instances. <a href="spans/SpanNearQuery.html">SpanNearQuery</a> allows for                much more                complicated phrase queries since it is constructed from other to <a                    href="spans/SpanQuery.html">SpanQuery</a>                instances, instead of only <a href="TermQuery.html">TermQuery</a>                instances.</p>        </li>    </ol></p><h4>    <a href="RangeQuery.html">RangeQuery</a></h4><p>The    <a href="RangeQuery.html">RangeQuery</a>    matches all documents that occur in the    exclusive range of a lower    <a href="../index/Term.html">Term</a>    and an upper    <a href="../index/Term.html">Term</a>.    For example, one could find all documents    that have terms beginning with the letters <tt>a</tt> through <tt>c</tt>. This type of <a        href="Query.html">Query</a> is frequently used to    find    documents that occur in a specific date range.</p><h4>    <a href="PrefixQuery.html">PrefixQuery</a>,    <a href="WildcardQuery.html">WildcardQuery</a></h4><p>While the    <a href="PrefixQuery.html">PrefixQuery</a>    has a different implementation, it is essentially a special case of the    <a href="WildcardQuery.html">WildcardQuery</a>.    The <a href="PrefixQuery.html">PrefixQuery</a> allows an application    to identify all documents with terms that begin with a certain string. The <a        href="WildcardQuery.html">WildcardQuery</a> generalizes this by allowing

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?