Lucene-2306: - Add NumericRangeQuery and NumericRangeFilter support to XMLQueryParser.

Jingkei Ly via Mark Harwood

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@928114 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Harwood 2010-03-27 00:36:55 +00:00
parent 65127736f0
commit b83700b51e
17 changed files with 1731 additions and 465 deletions

View File

@ -74,6 +74,8 @@ API Changes
(Robert Muir, Uwe Schindler, Simon Willnauer)
New features
* LUCENE-2306: Add NumericRangeFilter and NumericRangeQuery support to XMLQueryParser.
(Jingkei Ly, via Mark Harwood)
* LUCENE-2102: Add a Turkish LowerCase Filter. TurkishLowerCaseFilter handles
Turkish and Azeri unique casing behavior correctly.

View File

@ -54,8 +54,8 @@
<!-- @hidden Define core types of XML elements -->
<!ENTITY % coreSpanQueries "SpanOr|SpanNear|SpanOrTerms|SpanFirst|SpanNot|SpanTerm|BoostingTermQuery" >
<!ENTITY % coreQueries "BooleanQuery|UserQuery|FilteredQuery|TermQuery|TermsQuery|MatchAllDocsQuery|ConstantScoreQuery|BoostingTermQuery" >
<!ENTITY % coreFilters "RangeFilter|CachedFilter" >
<!ENTITY % coreQueries "BooleanQuery|UserQuery|FilteredQuery|TermQuery|TermsQuery|MatchAllDocsQuery|ConstantScoreQuery|BoostingTermQuery|NumericRangeQuery" >
<!ENTITY % coreFilters "RangeFilter|NumericRangeFilter|CachedFilter" >
<!-- @hidden Allow for extensions -->
<!ENTITY % extendedSpanQueries1 " " >
@ -283,7 +283,60 @@ Passes content directly through to the standard LuceneQuery parser see "Lucene Q
<!-- Controls if the upperTerm in the range is part of the allowed set of values -->
<!ATTLIST RangeFilter includeUpper (true | false) "true">
<!--
A Query that matches numeric values within a specified range.
@example
<em>Search for documents about people who are aged 20-25</em>
%
<NumericRangeQuery fieldName="age" lowerTerm="20" upperTerm="25" />
%
-->
<!ELEMENT NumericRangeQuery EMPTY>
<!-- fieldName must be defined here or is taken from the most immediate parent XML element that defines a "fieldName" attribute -->
<!ATTLIST NumericRangeQuery fieldName CDATA #IMPLIED>
<!-- The lower-most term value for this field (must be <= upperTerm and a valid native java numeric type) -->
<!ATTLIST NumericRangeQuery lowerTerm CDATA #REQUIRED>
<!-- The upper-most term value for this field (must be >= lowerTerm and a valid native java numeric type) -->
<!ATTLIST NumericRangeQuery upperTerm CDATA #REQUIRED>
<!-- The numeric type of this field -->
<!ATTLIST NumericRangeQuery type (int | long | float | double) "int">
<!-- Controls if the lowerTerm in the range is part of the allowed set of values -->
<!ATTLIST NumericRangeQuery includeLower (true | false) "true">
<!-- Controls if the upperTerm in the range is part of the allowed set of values -->
<!ATTLIST NumericRangeQuery includeUpper (true | false) "true">
<!-- Lower step values mean more precisions and so more terms in index (and index gets larger). This value must be an integer -->
<!ATTLIST NumericRangeQuery precisionStep CDATA "4">
<!--
A Filter that only accepts numeric values within a specified range
@example
<em>Search for documents about people who are aged 20-25</em>
%
<FilteredQuery>
<Query>
<UserQuery>person</UserQuery>
</Query>
<Filter>
<NumericRangeFilter fieldName="age" lowerTerm="20" upperTerm="25"/>
</Filter>
</FilteredQuery>
%
-->
<!ELEMENT NumericRangeFilter EMPTY>
<!-- fieldName must be defined here or is taken from the most immediate parent XML element that defines a "fieldName" attribute -->
<!ATTLIST NumericRangeFilter fieldName CDATA #IMPLIED>
<!-- The lower-most term value for this field (must be <= upperTerm and a valid native java numeric type) -->
<!ATTLIST NumericRangeFilter lowerTerm CDATA #REQUIRED>
<!-- The upper-most term value for this field (must be >= lowerTerm and a valid native java numeric type) -->
<!ATTLIST NumericRangeFilter upperTerm CDATA #REQUIRED>
<!-- The numeric type of this field -->
<!ATTLIST NumericRangeFilter type (int | long | float | double) "int">
<!-- Controls if the lowerTerm in the range is part of the allowed set of values -->
<!ATTLIST NumericRangeFilter includeLower (true | false) "true">
<!-- Controls if the upperTerm in the range is part of the allowed set of values -->
<!ATTLIST NumericRangeFilter includeUpper (true | false) "true">
<!-- Lower step values mean more precisions and so more terms in index (and index gets larger). This value must be an integer -->
<!ATTLIST NumericRangeFilter precisionStep CDATA "4">
<!-- A single term used in a SpanQuery. These clauses are the building blocks for more complex "span" queries which test word proximity
@example <em>Find documents using terms close to each other about mining and accidents</em>

View File

@ -59,13 +59,13 @@ LuceneCoreQuery.dtd <i>(system)</i>
<tr>
<td>coreSpanQueries</td>
<td>
SpanOr|SpanNear|SpanOrTerms|SpanFirst|SpanNot|SpanTerm
SpanOr|SpanNear|SpanOrTerms|SpanFirst|SpanNot|SpanTerm|BoostingTermQuery
</td>
</tr>
<tr>
<td>coreFilters</td>
<td>
RangeFilter|CachedFilter
RangeFilter|NumericRangeFilter|CachedFilter
</td>
</tr>
<tr>
@ -83,7 +83,7 @@ RangeFilter|CachedFilter
<tr>
<td>coreQueries</td>
<td>
BooleanQuery|UserQuery|FilteredQuery|TermQuery|TermsQuery|MatchAllDocsQuery|ConstantScoreQuery
BooleanQuery|UserQuery|FilteredQuery|TermQuery|TermsQuery|MatchAllDocsQuery|ConstantScoreQuery|BoostingTermQuery|NumericRangeQuery
</td>
</tr>
</tbody>

View File

@ -23,7 +23,7 @@ Influence score of a query's matches in a subtle way which can't be achieved usi
<a name='BooleanQuery'></a>
<br /><table class='elementTitle' summary="BooleanQuery"><tr><td class='leftElementTitle'>
&lt;BooleanQuery&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#BoostQuery'>BoostQuery</a>, <a href='#Query'>Query</a>, <a href='#Clause'>Clause</a>
Child of <a href='#BoostQuery'>BoostQuery</a>, <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
</td></tr></table>
<p>BooleanQuerys implement Boolean logic which controls how multiple Clauses should be interpreted.
Some clauses may represent optional Query criteria while others represent mandatory criteria.</p><p><span class='inTextTitle'>Example:</span> <em>Find articles about banks, preferably talking about mergers but nothing to do with "sumitomo"</em>
@ -94,6 +94,7 @@ child elements - while in a &lt;BooleanFilter> clause only "filter" types can be
<tbody><tr><td><a href='#BooleanFilter'>BooleanFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#BooleanQuery'>BooleanQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#BoostingQuery'>BoostingQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#CachedFilter'>CachedFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#ConstantScoreQuery'>ConstantScoreQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#DuplicateFilter'>DuplicateFilter</a></td><td>One or none</td></tr>
@ -101,6 +102,8 @@ child elements - while in a &lt;BooleanFilter> clause only "filter" types can be
<tr><td><a href='#FuzzyLikeThisQuery'>FuzzyLikeThisQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#LikeThisQuery'>LikeThisQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#NumericRangeFilter'>NumericRangeFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#NumericRangeQuery'>NumericRangeQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#RangeFilter'>RangeFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
@ -120,7 +123,7 @@ child elements - while in a &lt;BooleanFilter> clause only "filter" types can be
<th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
<tr><th colspan='3' height='1' class='ruler'></th></tr>
<tr><td><a href='#Clause_occurs'>occurs</a></td><td>should, must, mustnot</td><td>should</td></tr></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#BooleanQuery'>BooleanQuery</a> | <a href='#UserQuery'>UserQuery</a> | <a href='#FilteredQuery'>FilteredQuery</a> | <a href='#TermQuery'>TermQuery</a> | <a href='#TermsQuery'>TermsQuery</a> | <a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a> | <a href='#ConstantScoreQuery'>ConstantScoreQuery</a> | <a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#LikeThisQuery'>LikeThisQuery</a> | <a href='#BoostingQuery'>BoostingQuery</a> | <a href='#FuzzyLikeThisQuery'>FuzzyLikeThisQuery</a> | <a href='#RangeFilter'>RangeFilter</a> | <a href='#CachedFilter'>CachedFilter</a> | <a href='#TermsFilter'>TermsFilter</a> | <a href='#BooleanFilter'>BooleanFilter</a> | <a href='#DuplicateFilter'>DuplicateFilter</a>)</p><a name='Clause_occurs'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#BooleanQuery'>BooleanQuery</a> | <a href='#UserQuery'>UserQuery</a> | <a href='#FilteredQuery'>FilteredQuery</a> | <a href='#TermQuery'>TermQuery</a> | <a href='#TermsQuery'>TermsQuery</a> | <a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a> | <a href='#ConstantScoreQuery'>ConstantScoreQuery</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a> | <a href='#NumericRangeQuery'>NumericRangeQuery</a> | <a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a> | <a href='#LikeThisQuery'>LikeThisQuery</a> | <a href='#BoostingQuery'>BoostingQuery</a> | <a href='#FuzzyLikeThisQuery'>FuzzyLikeThisQuery</a> | <a href='#RangeFilter'>RangeFilter</a> | <a href='#NumericRangeFilter'>NumericRangeFilter</a> | <a href='#CachedFilter'>CachedFilter</a> | <a href='#TermsFilter'>TermsFilter</a> | <a href='#BooleanFilter'>BooleanFilter</a> | <a href='#DuplicateFilter'>DuplicateFilter</a>)</p><a name='Clause_occurs'></a>
<br /><table class='attributeTitle' summary="occurs"><tr><td class='leftAttributeTitle'>
@occurs</td><td class='rightAttributeTitle'>
Attribute of <a href='#Clause'>Clause</a>
@ -128,7 +131,7 @@ Attribute of <a href='#Clause'>Clause</a>
<p>Controls if the clause is optional (should), mandatory (must) or unacceptable (mustNot)</p><p><span class='inTextTitle'>Possible values</span>: should, must, mustnot - <span class='inTextTitle'>Default value</span>: should</p><a name='CachedFilter'></a>
<br /><table class='elementTitle' summary="CachedFilter"><tr><td class='leftElementTitle'>
&lt;CachedFilter&gt;</td><td class='rightElementTitle'>
Child of <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>, <a href='#Filter'>Filter</a>, <a href='#Clause'>Clause</a>
Child of <a href='#Clause'>Clause</a>, <a href='#Filter'>Filter</a>, <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>
</td></tr></table>
<p>Caches any nested query or filter in an LRU (Least recently used) Cache. Cached queries, like filters, are turned into
Bitsets at a cost of 1 bit per document in the index. The memory cost of a cached query/filter is therefore numberOfDocsinIndex/8 bytes.
@ -157,6 +160,7 @@ RAM to eliminate the cost of building this filter from disk for every query</em>
<tbody><tr><td><a href='#BooleanFilter'>BooleanFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#BooleanQuery'>BooleanQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#BoostingQuery'>BoostingQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#CachedFilter'>CachedFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#ConstantScoreQuery'>ConstantScoreQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#DuplicateFilter'>DuplicateFilter</a></td><td>One or none</td></tr>
@ -164,6 +168,8 @@ RAM to eliminate the cost of building this filter from disk for every query</em>
<tr><td><a href='#FuzzyLikeThisQuery'>FuzzyLikeThisQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#LikeThisQuery'>LikeThisQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#NumericRangeFilter'>NumericRangeFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#NumericRangeQuery'>NumericRangeQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#RangeFilter'>RangeFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
@ -176,10 +182,10 @@ RAM to eliminate the cost of building this filter from disk for every query</em>
<tr><td><a href='#TermsQuery'>TermsQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#UserQuery'>UserQuery</a></td><td>One or none</td></tr>
</tbody></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#BooleanQuery'>BooleanQuery</a> | <a href='#UserQuery'>UserQuery</a> | <a href='#FilteredQuery'>FilteredQuery</a> | <a href='#TermQuery'>TermQuery</a> | <a href='#TermsQuery'>TermsQuery</a> | <a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a> | <a href='#ConstantScoreQuery'>ConstantScoreQuery</a> | <a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#LikeThisQuery'>LikeThisQuery</a> | <a href='#BoostingQuery'>BoostingQuery</a> | <a href='#FuzzyLikeThisQuery'>FuzzyLikeThisQuery</a> | <a href='#RangeFilter'>RangeFilter</a> | <a href='#CachedFilter'>CachedFilter</a> | <a href='#TermsFilter'>TermsFilter</a> | <a href='#BooleanFilter'>BooleanFilter</a> | <a href='#DuplicateFilter'>DuplicateFilter</a>)</p><a name='UserQuery'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#BooleanQuery'>BooleanQuery</a> | <a href='#UserQuery'>UserQuery</a> | <a href='#FilteredQuery'>FilteredQuery</a> | <a href='#TermQuery'>TermQuery</a> | <a href='#TermsQuery'>TermsQuery</a> | <a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a> | <a href='#ConstantScoreQuery'>ConstantScoreQuery</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a> | <a href='#NumericRangeQuery'>NumericRangeQuery</a> | <a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a> | <a href='#LikeThisQuery'>LikeThisQuery</a> | <a href='#BoostingQuery'>BoostingQuery</a> | <a href='#FuzzyLikeThisQuery'>FuzzyLikeThisQuery</a> | <a href='#RangeFilter'>RangeFilter</a> | <a href='#NumericRangeFilter'>NumericRangeFilter</a> | <a href='#CachedFilter'>CachedFilter</a> | <a href='#TermsFilter'>TermsFilter</a> | <a href='#BooleanFilter'>BooleanFilter</a> | <a href='#DuplicateFilter'>DuplicateFilter</a>)</p><a name='UserQuery'></a>
<br /><table class='elementTitle' summary="UserQuery"><tr><td class='leftElementTitle'>
&lt;UserQuery&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#BoostQuery'>BoostQuery</a>, <a href='#Query'>Query</a>, <a href='#Clause'>Clause</a>
Child of <a href='#BoostQuery'>BoostQuery</a>, <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
</td></tr></table>
<p>Passes content directly through to the standard LuceneQuery parser see "Lucene Query Syntax"</p><p><span class='inTextTitle'>Example:</span> <em>Search for documents about John Smith or John Doe using standard LuceneQuerySyntax</em>
</p><pre>
@ -206,7 +212,7 @@ Attribute of <a href='#UserQuery'>UserQuery</a>
<p>fieldName can optionally be defined here to change the default field used in the QueryParser</p><a name='MatchAllDocsQuery'></a>
<br /><table class='elementTitle' summary="MatchAllDocsQuery"><tr><td class='leftElementTitle'>
&lt;MatchAllDocsQuery/&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#BoostQuery'>BoostQuery</a>, <a href='#Query'>Query</a>, <a href='#Clause'>Clause</a>
Child of <a href='#BoostQuery'>BoostQuery</a>, <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
</td></tr></table>
<p>A query which is used to match all documents. This has a couple of uses:
<ol>
@ -227,7 +233,7 @@ used to select content rather than it's usual role of filtering the results of a
</pre><p></p><p class='emptyTagNote'>This element is always empty.</p><a name='TermQuery'></a>
<br /><table class='elementTitle' summary="TermQuery"><tr><td class='leftElementTitle'>
&lt;TermQuery&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#BoostQuery'>BoostQuery</a>, <a href='#Query'>Query</a>, <a href='#Clause'>Clause</a>
Child of <a href='#BoostQuery'>BoostQuery</a>, <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
</td></tr></table>
<p>a single term query - no analysis is done of the child text</p><p><span class='inTextTitle'>Example:</span> <em>Match on a primary key</em>
</p><pre>
@ -251,10 +257,25 @@ Attribute of <a href='#TermQuery'>TermQuery</a>
@fieldName</td><td class='rightAttributeTitle'>
Attribute of <a href='#TermQuery'>TermQuery</a>
</td></tr></table>
<p>fieldName must be defined here or is taken from the most immediate parent XML element that defines a "fieldName" attribute</p><a name='BoostingTermQuery'></a>
<br /><table class='elementTitle' summary="BoostingTermQuery"><tr><td class='leftElementTitle'>
&lt;BoostingTermQuery&gt;</td><td class='rightElementTitle'>
Child of <a href='#BoostQuery'>BoostQuery</a>, <a href='#Clause'>Clause</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Include'>Include</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanOr'>SpanOr</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#Exclude'>Exclude</a>, <a href='#Query'>Query</a>
</td></tr></table>
<p>A boosted term query - no analysis is done of the child text. Also a span member.</p><p>(Text below is copied from the javadocs of BoostingTermQuery)</p><p>The BoostingTermQuery is very similar to the {</p><a name='TermQuery_boost'></a>
<br /><table class='attributeTitle' summary="boost"><tr><td class='leftAttributeTitle'>
@boost</td><td class='rightAttributeTitle'>
Attribute of <a href='#TermQuery'>TermQuery</a>
</td></tr></table>
<p>Optional boost for matches on this query. Values > 1</p><p><span class='inTextTitle'>Default value</span>: 1.0</p><a name='TermQuery_fieldName'></a>
<br /><table class='attributeTitle' summary="fieldName"><tr><td class='leftAttributeTitle'>
@fieldName</td><td class='rightAttributeTitle'>
Attribute of <a href='#TermQuery'>TermQuery</a>
</td></tr></table>
<p>fieldName must be defined here or is taken from the most immediate parent XML element that defines a "fieldName" attribute</p><a name='TermsQuery'></a>
<br /><table class='elementTitle' summary="TermsQuery"><tr><td class='leftElementTitle'>
&lt;TermsQuery&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#BoostQuery'>BoostQuery</a>, <a href='#Query'>Query</a>, <a href='#Clause'>Clause</a>
Child of <a href='#BoostQuery'>BoostQuery</a>, <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
</td></tr></table>
<p>The equivalent of a BooleanQuery with multiple optional TermQuery clauses.
Child text is analyzed using a field-specific choice of Analyzer to produce a set of terms that are ORed together in Boolean logic.
@ -295,7 +316,7 @@ Attribute of <a href='#TermsQuery'>TermsQuery</a>
<p>The minimum number of terms that should be present in any one document before it is considered to be a match.</p><p><span class='inTextTitle'>Default value</span>: 0</p><a name='FilteredQuery'></a>
<br /><table class='elementTitle' summary="FilteredQuery"><tr><td class='leftElementTitle'>
&lt;FilteredQuery&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#BoostQuery'>BoostQuery</a>, <a href='#Query'>Query</a>, <a href='#Clause'>Clause</a>
Child of <a href='#BoostQuery'>BoostQuery</a>, <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
</td></tr></table>
<p>Runs a Query and filters results to only those query matches that also match the Filter element.</p><p><span class='inTextTitle'>Example:</span> <em>Find all documents about Lucene that have a status of "published"</em>
</p><pre>
@ -333,7 +354,7 @@ Attribute of <a href='#FilteredQuery'>FilteredQuery</a>
<p>Optional boost for matches on this query. Values > 1</p><p><span class='inTextTitle'>Default value</span>: 1.0</p><a name='Query'></a>
<br /><table class='elementTitle' summary="Query"><tr><td class='leftElementTitle'>
&lt;Query&gt;</td><td class='rightElementTitle'>
Child of <a href='#BoostingQuery'>BoostingQuery</a>, <a href='#FilteredQuery'>FilteredQuery</a>
Child of <a href='#FilteredQuery'>FilteredQuery</a>, <a href='#BoostingQuery'>BoostingQuery</a>
</td></tr></table>
<p>Used to identify a nested Query element inside another container element. NOT a top-level query tag</p><blockquote><table summary='element info'><tr>
<td class='construct'><table summary="&lt;Query&gt;'s children">
@ -345,11 +366,13 @@ Child of <a href='#BoostingQuery'>BoostingQuery</a>, <a href='#FilteredQuery'>Fi
</thead>
<tbody><tr><td><a href='#BooleanQuery'>BooleanQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#BoostingQuery'>BoostingQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#ConstantScoreQuery'>ConstantScoreQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#FilteredQuery'>FilteredQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#FuzzyLikeThisQuery'>FuzzyLikeThisQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#LikeThisQuery'>LikeThisQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#NumericRangeQuery'>NumericRangeQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNot'>SpanNot</a></td><td>One or none</td></tr>
@ -360,7 +383,7 @@ Child of <a href='#BoostingQuery'>BoostingQuery</a>, <a href='#FilteredQuery'>Fi
<tr><td><a href='#TermsQuery'>TermsQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#UserQuery'>UserQuery</a></td><td>One or none</td></tr>
</tbody></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#BooleanQuery'>BooleanQuery</a> | <a href='#UserQuery'>UserQuery</a> | <a href='#FilteredQuery'>FilteredQuery</a> | <a href='#TermQuery'>TermQuery</a> | <a href='#TermsQuery'>TermsQuery</a> | <a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a> | <a href='#ConstantScoreQuery'>ConstantScoreQuery</a> | <a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#LikeThisQuery'>LikeThisQuery</a> | <a href='#BoostingQuery'>BoostingQuery</a> | <a href='#FuzzyLikeThisQuery'>FuzzyLikeThisQuery</a>)</p><a name='Filter'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#BooleanQuery'>BooleanQuery</a> | <a href='#UserQuery'>UserQuery</a> | <a href='#FilteredQuery'>FilteredQuery</a> | <a href='#TermQuery'>TermQuery</a> | <a href='#TermsQuery'>TermsQuery</a> | <a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a> | <a href='#ConstantScoreQuery'>ConstantScoreQuery</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a> | <a href='#NumericRangeQuery'>NumericRangeQuery</a> | <a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a> | <a href='#LikeThisQuery'>LikeThisQuery</a> | <a href='#BoostingQuery'>BoostingQuery</a> | <a href='#FuzzyLikeThisQuery'>FuzzyLikeThisQuery</a>)</p><a name='Filter'></a>
<br /><table class='elementTitle' summary="Filter"><tr><td class='leftElementTitle'>
&lt;Filter&gt;</td><td class='rightElementTitle'>
Child of <a href='#FilteredQuery'>FilteredQuery</a>
@ -376,13 +399,14 @@ Child of <a href='#FilteredQuery'>FilteredQuery</a>
<tbody><tr><td><a href='#BooleanFilter'>BooleanFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#CachedFilter'>CachedFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#DuplicateFilter'>DuplicateFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#NumericRangeFilter'>NumericRangeFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#RangeFilter'>RangeFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#TermsFilter'>TermsFilter</a></td><td>One or none</td></tr>
</tbody></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#RangeFilter'>RangeFilter</a> | <a href='#CachedFilter'>CachedFilter</a> | <a href='#TermsFilter'>TermsFilter</a> | <a href='#BooleanFilter'>BooleanFilter</a> | <a href='#DuplicateFilter'>DuplicateFilter</a>)</p><a name='RangeFilter'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#RangeFilter'>RangeFilter</a> | <a href='#NumericRangeFilter'>NumericRangeFilter</a> | <a href='#CachedFilter'>CachedFilter</a> | <a href='#TermsFilter'>TermsFilter</a> | <a href='#BooleanFilter'>BooleanFilter</a> | <a href='#DuplicateFilter'>DuplicateFilter</a>)</p><a name='RangeFilter'></a>
<br /><table class='elementTitle' summary="RangeFilter"><tr><td class='leftElementTitle'>
&lt;RangeFilter/&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>, <a href='#Filter'>Filter</a>, <a href='#Clause'>Clause</a>
Child of <a href='#Clause'>Clause</a>, <a href='#Filter'>Filter</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>
</td></tr></table>
<p>Filter used to limit query results to documents matching a range of field values</p><p><span class='inTextTitle'>Example:</span> <em>Search for documents about banks from the last 10 years</em>
</p><pre>
@ -428,10 +452,121 @@ Attribute of <a href='#RangeFilter'>RangeFilter</a>
@includeUpper</td><td class='rightAttributeTitle'>
Attribute of <a href='#RangeFilter'>RangeFilter</a>
</td></tr></table>
<p>Controls if the upperTerm in the range is part of the allowed set of values</p><p><span class='inTextTitle'>Possible values</span>: true, false - <span class='inTextTitle'>Default value</span>: true</p><a name='SpanTerm'></a>
<p>Controls if the upperTerm in the range is part of the allowed set of values</p><p><span class='inTextTitle'>Possible values</span>: true, false - <span class='inTextTitle'>Default value</span>: true</p><a name='NumericRangeQuery'></a>
<br /><table class='elementTitle' summary="NumericRangeQuery"><tr><td class='leftElementTitle'>
&lt;NumericRangeQuery/&gt;</td><td class='rightElementTitle'>
Child of <a href='#BoostQuery'>BoostQuery</a>, <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
</td></tr></table>
<p>A Query that matches numeric values within a specified range.</p><p><span class='inTextTitle'>Example:</span> <em>Search for documents about people who are aged 20-25</em>
</p><pre>
&lt;NumericRangeQuery fieldName="age" lowerTerm="20" upperTerm="25" /&gt;
</pre><p></p><blockquote>
<table summary="&lt;NumericRangeQuery&gt;'s attributes"><tr>
<th class='title' colspan='3'>&lt;NumericRangeQuery&gt;'s attributes</th>
</tr>
<tr><th colspan='3' height='1' class='ruler'></th></tr>
<tr>
<th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
<tr><th colspan='3' height='1' class='ruler'></th></tr>
<tr><td><a href='#NumericRangeQuery_fieldName'>fieldName</a></td><td></td><td></td></tr><tr><td><a href='#NumericRangeQuery_includeLower'>includeLower</a></td><td>true, false</td><td>true</td></tr><tr><td><a href='#NumericRangeQuery_includeUpper'>includeUpper</a></td><td>true, false</td><td>true</td></tr><tr><td><a href='#NumericRangeQuery_lowerTerm'>lowerTerm</a></td><td></td><td></td></tr><tr><td><a href='#NumericRangeQuery_precisionStep'>precisionStep</a></td><td></td><td>4</td></tr><tr><td><a href='#NumericRangeQuery_type'>type</a></td><td>int, long, float, double</td><td>int</td></tr><tr><td><a href='#NumericRangeQuery_upperTerm'>upperTerm</a></td><td></td><td></td></tr></table></blockquote>
<p class='emptyTagNote'>This element is always empty.</p><a name='NumericRangeQuery_fieldName'></a>
<br /><table class='attributeTitle' summary="fieldName"><tr><td class='leftAttributeTitle'>
@fieldName</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
</td></tr></table>
<p>fieldName must be defined here or is taken from the most immediate parent XML element that defines a "fieldName" attribute</p><a name='NumericRangeQuery_lowerTerm'></a>
<br /><table class='attributeTitle' summary="lowerTerm"><tr><td class='leftAttributeTitle'>
@lowerTerm</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
</td></tr></table>
<p>The lower-most term value for this field (must be &lt;= upperTerm and a valid native java numeric type)</p><p><span class='inTextTitle'>Required</span></p><a name='NumericRangeQuery_upperTerm'></a>
<br /><table class='attributeTitle' summary="upperTerm"><tr><td class='leftAttributeTitle'>
@upperTerm</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
</td></tr></table>
<p>The upper-most term value for this field (must be >= lowerTerm and a valid native java numeric type)</p><p><span class='inTextTitle'>Required</span></p><a name='NumericRangeQuery_type'></a>
<br /><table class='attributeTitle' summary="type"><tr><td class='leftAttributeTitle'>
@type</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
</td></tr></table>
<p>The numeric type of this field</p><p><span class='inTextTitle'>Possible values</span>: int, long, float, double - <span class='inTextTitle'>Default value</span>: int</p><a name='NumericRangeQuery_includeLower'></a>
<br /><table class='attributeTitle' summary="includeLower"><tr><td class='leftAttributeTitle'>
@includeLower</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
</td></tr></table>
<p>Controls if the lowerTerm in the range is part of the allowed set of values</p><p><span class='inTextTitle'>Possible values</span>: true, false - <span class='inTextTitle'>Default value</span>: true</p><a name='NumericRangeQuery_includeUpper'></a>
<br /><table class='attributeTitle' summary="includeUpper"><tr><td class='leftAttributeTitle'>
@includeUpper</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
</td></tr></table>
<p>Controls if the upperTerm in the range is part of the allowed set of values</p><p><span class='inTextTitle'>Possible values</span>: true, false - <span class='inTextTitle'>Default value</span>: true</p><a name='NumericRangeQuery_precisionStep'></a>
<br /><table class='attributeTitle' summary="precisionStep"><tr><td class='leftAttributeTitle'>
@precisionStep</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
</td></tr></table>
<p>Lower step values mean more precisions and so more terms in index (and index gets larger). This value must be an integer</p><p><span class='inTextTitle'>Default value</span>: 4</p><a name='NumericRangeFilter'></a>
<br /><table class='elementTitle' summary="NumericRangeFilter"><tr><td class='leftElementTitle'>
&lt;NumericRangeFilter/&gt;</td><td class='rightElementTitle'>
Child of <a href='#Clause'>Clause</a>, <a href='#Filter'>Filter</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>
</td></tr></table>
<p>A Filter that only accepts numeric values within a specified range</p><p><span class='inTextTitle'>Example:</span> <em>Search for documents about people who are aged 20-25</em>
</p><pre>
&lt;FilteredQuery&gt;
&lt;Query&gt;
&lt;UserQuery&gt;person&lt;/UserQuery&gt;
&lt;/Query&gt;
&lt;Filter&gt;
&lt;NumericRangeFilter fieldName="age" lowerTerm="20" upperTerm="25"/&gt;
&lt;/Filter&gt;
&lt;/FilteredQuery&gt;
</pre><p></p><blockquote>
<table summary="&lt;NumericRangeFilter&gt;'s attributes"><tr>
<th class='title' colspan='3'>&lt;NumericRangeFilter&gt;'s attributes</th>
</tr>
<tr><th colspan='3' height='1' class='ruler'></th></tr>
<tr>
<th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
<tr><th colspan='3' height='1' class='ruler'></th></tr>
<tr><td><a href='#NumericRangeFilter_fieldName'>fieldName</a></td><td></td><td></td></tr><tr><td><a href='#NumericRangeFilter_includeLower'>includeLower</a></td><td>true, false</td><td>true</td></tr><tr><td><a href='#NumericRangeFilter_includeUpper'>includeUpper</a></td><td>true, false</td><td>true</td></tr><tr><td><a href='#NumericRangeFilter_lowerTerm'>lowerTerm</a></td><td></td><td></td></tr><tr><td><a href='#NumericRangeFilter_precisionStep'>precisionStep</a></td><td></td><td>4</td></tr><tr><td><a href='#NumericRangeFilter_type'>type</a></td><td>int, long, float, double</td><td>int</td></tr><tr><td><a href='#NumericRangeFilter_upperTerm'>upperTerm</a></td><td></td><td></td></tr></table></blockquote>
<p class='emptyTagNote'>This element is always empty.</p><a name='NumericRangeFilter_fieldName'></a>
<br /><table class='attributeTitle' summary="fieldName"><tr><td class='leftAttributeTitle'>
@fieldName</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
</td></tr></table>
<p>fieldName must be defined here or is taken from the most immediate parent XML element that defines a "fieldName" attribute</p><a name='NumericRangeFilter_lowerTerm'></a>
<br /><table class='attributeTitle' summary="lowerTerm"><tr><td class='leftAttributeTitle'>
@lowerTerm</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
</td></tr></table>
<p>The lower-most term value for this field (must be &lt;= upperTerm and a valid native java numeric type)</p><p><span class='inTextTitle'>Required</span></p><a name='NumericRangeFilter_upperTerm'></a>
<br /><table class='attributeTitle' summary="upperTerm"><tr><td class='leftAttributeTitle'>
@upperTerm</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
</td></tr></table>
<p>The upper-most term value for this field (must be >= lowerTerm and a valid native java numeric type)</p><p><span class='inTextTitle'>Required</span></p><a name='NumericRangeFilter_type'></a>
<br /><table class='attributeTitle' summary="type"><tr><td class='leftAttributeTitle'>
@type</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
</td></tr></table>
<p>The numeric type of this field</p><p><span class='inTextTitle'>Possible values</span>: int, long, float, double - <span class='inTextTitle'>Default value</span>: int</p><a name='NumericRangeFilter_includeLower'></a>
<br /><table class='attributeTitle' summary="includeLower"><tr><td class='leftAttributeTitle'>
@includeLower</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
</td></tr></table>
<p>Controls if the lowerTerm in the range is part of the allowed set of values</p><p><span class='inTextTitle'>Possible values</span>: true, false - <span class='inTextTitle'>Default value</span>: true</p><a name='NumericRangeFilter_includeUpper'></a>
<br /><table class='attributeTitle' summary="includeUpper"><tr><td class='leftAttributeTitle'>
@includeUpper</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
</td></tr></table>
<p>Controls if the upperTerm in the range is part of the allowed set of values</p><p><span class='inTextTitle'>Possible values</span>: true, false - <span class='inTextTitle'>Default value</span>: true</p><a name='NumericRangeFilter_precisionStep'></a>
<br /><table class='attributeTitle' summary="precisionStep"><tr><td class='leftAttributeTitle'>
@precisionStep</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
</td></tr></table>
<p>Lower step values mean more precisions and so more terms in index (and index gets larger). This value must be an integer</p><p><span class='inTextTitle'>Default value</span>: 4</p><a name='SpanTerm'></a>
<br /><table class='elementTitle' summary="SpanTerm"><tr><td class='leftElementTitle'>
&lt;SpanTerm&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#BoostQuery'>BoostQuery</a>, <a href='#Query'>Query</a>, <a href='#Include'>Include</a>, <a href='#SpanOr'>SpanOr</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Clause'>Clause</a>, <a href='#Exclude'>Exclude</a>
Child of <a href='#BoostQuery'>BoostQuery</a>, <a href='#Clause'>Clause</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Include'>Include</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanOr'>SpanOr</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#Exclude'>Exclude</a>, <a href='#Query'>Query</a>
</td></tr></table>
<p>A single term used in a SpanQuery. These clauses are the building blocks for more complex "span" queries which test word proximity</p><p><span class='inTextTitle'>Example:</span> <em>Find documents using terms close to each other about mining and accidents</em>
</p><pre>
@ -464,7 +599,7 @@ Attribute of <a href='#SpanTerm'>SpanTerm</a>
<p>fieldName must be defined here or is taken from the most immediate parent XML element that defines a "fieldName" attribute</p><p><span class='inTextTitle'>Required</span></p><a name='SpanOrTerms'></a>
<br /><table class='elementTitle' summary="SpanOrTerms"><tr><td class='leftElementTitle'>
&lt;SpanOrTerms&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#BoostQuery'>BoostQuery</a>, <a href='#Query'>Query</a>, <a href='#Include'>Include</a>, <a href='#SpanOr'>SpanOr</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Clause'>Clause</a>, <a href='#Exclude'>Exclude</a>
Child of <a href='#BoostQuery'>BoostQuery</a>, <a href='#Clause'>Clause</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Include'>Include</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanOr'>SpanOr</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#Exclude'>Exclude</a>, <a href='#Query'>Query</a>
</td></tr></table>
<p>A field-specific analyzer is used here to parse the child text provided in this tag. The SpanTerms produced are ORed in terms of Boolean logic</p><p><span class='inTextTitle'>Example:</span> <em>Use SpanOrTerms as a more convenient/succinct way of expressing multiple choices of SpanTerms. This example looks for reports
using words describing a fatality near to references to miners</em>
@ -490,7 +625,7 @@ Attribute of <a href='#SpanOrTerms'>SpanOrTerms</a>
<p>fieldName must be defined here or is taken from the most immediate parent XML element that defines a "fieldName" attribute</p><p><span class='inTextTitle'>Required</span></p><a name='SpanOr'></a>
<br /><table class='elementTitle' summary="SpanOr"><tr><td class='leftElementTitle'>
&lt;SpanOr&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#BoostQuery'>BoostQuery</a>, <a href='#Query'>Query</a>, <a href='#Include'>Include</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Clause'>Clause</a>, <a href='#Exclude'>Exclude</a>
Child of <a href='#BoostQuery'>BoostQuery</a>, <a href='#Clause'>Clause</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Include'>Include</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#Exclude'>Exclude</a>, <a href='#Query'>Query</a>
</td></tr></table>
<p>Takes any number of child queries from the Span family</p><p><span class='inTextTitle'>Example:</span> <em>Find documents using terms close to each other about mining and accidents</em>
</p><pre>
@ -514,17 +649,18 @@ Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanNear'>SpanNear<
<tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
<tr><th colspan='2' height='1' class='ruler'></th></tr>
</thead>
<tbody><tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>Any number</td></tr>
<tbody><tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanNear'>SpanNear</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanNot'>SpanNot</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanOr'>SpanOr</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanOrTerms'>SpanOrTerms</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanTerm'>SpanTerm</a></td><td>Any number</td></tr>
</tbody></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a>)*</p><a name='SpanNear'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a>)*</p><a name='SpanNear'></a>
<br /><table class='elementTitle' summary="SpanNear"><tr><td class='leftElementTitle'>
&lt;SpanNear&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#BoostQuery'>BoostQuery</a>, <a href='#Query'>Query</a>, <a href='#Include'>Include</a>, <a href='#SpanOr'>SpanOr</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Clause'>Clause</a>, <a href='#Exclude'>Exclude</a>
Child of <a href='#BoostQuery'>BoostQuery</a>, <a href='#Clause'>Clause</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Include'>Include</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanOr'>SpanOr</a>, <a href='#Exclude'>Exclude</a>, <a href='#Query'>Query</a>
</td></tr></table>
<p>Takes any number of child queries from the Span family and tests for proximity</p><blockquote><table summary='element info'><tr>
<td class='construct'><table summary="&lt;SpanNear&gt;'s children">
@ -534,7 +670,8 @@ Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#BoostQuery'>BoostQu
<tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
<tr><th colspan='2' height='1' class='ruler'></th></tr>
</thead>
<tbody><tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>Any number</td></tr>
<tbody><tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanNear'>SpanNear</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanNot'>SpanNot</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanOr'>SpanOr</a></td><td>Any number</td></tr>
@ -548,7 +685,7 @@ Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#BoostQuery'>BoostQu
<th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
<tr><th colspan='3' height='1' class='ruler'></th></tr>
<tr><td><a href='#SpanNear_inOrder'>inOrder</a></td><td>true, false</td><td>true</td></tr><tr><td><a href='#SpanNear_slop'>slop</a></td><td></td><td></td></tr></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a>)*</p><a name='SpanNear_slop'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a>)*</p><a name='SpanNear_slop'></a>
<br /><table class='attributeTitle' summary="slop"><tr><td class='leftAttributeTitle'>
@slop</td><td class='rightAttributeTitle'>
Attribute of <a href='#SpanNear'>SpanNear</a>
@ -575,7 +712,7 @@ Attribute of <a href='#SpanNear'>SpanNear</a>
<p>Controls if matching terms have to appear in the order listed or can be reversed</p><p><span class='inTextTitle'>Possible values</span>: true, false - <span class='inTextTitle'>Default value</span>: true</p><a name='SpanFirst'></a>
<br /><table class='elementTitle' summary="SpanFirst"><tr><td class='leftElementTitle'>
&lt;SpanFirst&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#BoostQuery'>BoostQuery</a>, <a href='#Query'>Query</a>, <a href='#Include'>Include</a>, <a href='#SpanOr'>SpanOr</a>, <a href='#Clause'>Clause</a>, <a href='#Exclude'>Exclude</a>
Child of <a href='#BoostQuery'>BoostQuery</a>, <a href='#Clause'>Clause</a>, <a href='#Include'>Include</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanOr'>SpanOr</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#Exclude'>Exclude</a>, <a href='#Query'>Query</a>
</td></tr></table>
<p>Looks for a SpanQuery match occuring near the beginning of a document</p><p><span class='inTextTitle'>Example:</span> <em>Find letters where the first 50 words talk about a resignation:</em>
</p><pre>
@ -590,7 +727,8 @@ Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanNear'>SpanNear<
<tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
<tr><th colspan='2' height='1' class='ruler'></th></tr>
</thead>
<tbody><tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tbody><tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNot'>SpanNot</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanOr'>SpanOr</a></td><td>One or none</td></tr>
@ -604,7 +742,7 @@ Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanNear'>SpanNear<
<th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
<tr><th colspan='3' height='1' class='ruler'></th></tr>
<tr><td><a href='#SpanFirst_boost'>boost</a></td><td></td><td>1.0</td></tr><tr><td><a href='#SpanFirst_end'>end</a></td><td></td><td></td></tr></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a>)</p><a name='SpanFirst_end'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a>)</p><a name='SpanFirst_end'></a>
<br /><table class='attributeTitle' summary="end"><tr><td class='leftAttributeTitle'>
@end</td><td class='rightAttributeTitle'>
Attribute of <a href='#SpanFirst'>SpanFirst</a>
@ -617,7 +755,7 @@ Attribute of <a href='#SpanFirst'>SpanFirst</a>
<p>Optional boost for matches on this query. Values > 1</p><p><span class='inTextTitle'>Default value</span>: 1.0</p><a name='SpanNot'></a>
<br /><table class='elementTitle' summary="SpanNot"><tr><td class='leftElementTitle'>
&lt;SpanNot&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#BoostQuery'>BoostQuery</a>, <a href='#Query'>Query</a>, <a href='#Include'>Include</a>, <a href='#SpanOr'>SpanOr</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Clause'>Clause</a>, <a href='#Exclude'>Exclude</a>
Child of <a href='#BoostQuery'>BoostQuery</a>, <a href='#Clause'>Clause</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Include'>Include</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanOr'>SpanOr</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#Exclude'>Exclude</a>, <a href='#Query'>Query</a>
</td></tr></table>
<p>Finds documents matching a SpanQuery but not if matching another SpanQuery</p><p><span class='inTextTitle'>Example:</span> <em>Find documents talking about social services but not containing the word "public"</em>
</p><pre>
@ -656,14 +794,15 @@ Child of <a href='#SpanNot'>SpanNot</a>
<tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
<tr><th colspan='2' height='1' class='ruler'></th></tr>
</thead>
<tbody><tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tbody><tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNot'>SpanNot</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanOr'>SpanOr</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanOrTerms'>SpanOrTerms</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanTerm'>SpanTerm</a></td><td>One or none</td></tr>
</tbody></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a>)</p><a name='Exclude'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a>)</p><a name='Exclude'></a>
<br /><table class='elementTitle' summary="Exclude"><tr><td class='leftElementTitle'>
&lt;Exclude&gt;</td><td class='rightElementTitle'>
Child of <a href='#SpanNot'>SpanNot</a>
@ -676,17 +815,18 @@ Child of <a href='#SpanNot'>SpanNot</a>
<tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
<tr><th colspan='2' height='1' class='ruler'></th></tr>
</thead>
<tbody><tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tbody><tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNot'>SpanNot</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanOr'>SpanOr</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanOrTerms'>SpanOrTerms</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanTerm'>SpanTerm</a></td><td>One or none</td></tr>
</tbody></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a>)</p><a name='ConstantScoreQuery'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a>)</p><a name='ConstantScoreQuery'></a>
<br /><table class='elementTitle' summary="ConstantScoreQuery"><tr><td class='leftElementTitle'>
&lt;ConstantScoreQuery&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#BoostQuery'>BoostQuery</a>, <a href='#Query'>Query</a>, <a href='#Clause'>Clause</a>
Child of <a href='#BoostQuery'>BoostQuery</a>, <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
</td></tr></table>
<p>a utility tag to wrap any filter as a query</p><p><span class='inTextTitle'>Example:</span> <em> Find all documents from the last 10 years </em>
</p><pre>
@ -704,6 +844,7 @@ Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#BoostQuery'>BoostQu
<tbody><tr><td><a href='#BooleanFilter'>BooleanFilter</a></td><td>Any number</td></tr>
<tr><td><a href='#CachedFilter'>CachedFilter</a></td><td>Any number</td></tr>
<tr><td><a href='#DuplicateFilter'>DuplicateFilter</a></td><td>Any number</td></tr>
<tr><td><a href='#NumericRangeFilter'>NumericRangeFilter</a></td><td>Any number</td></tr>
<tr><td><a href='#RangeFilter'>RangeFilter</a></td><td>Any number</td></tr>
<tr><td><a href='#TermsFilter'>TermsFilter</a></td><td>Any number</td></tr>
</tbody></table></td><td class='construct'><table summary="&lt;ConstantScoreQuery&gt;'s attributes"><tr>
@ -714,7 +855,7 @@ Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#BoostQuery'>BoostQu
<th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
<tr><th colspan='3' height='1' class='ruler'></th></tr>
<tr><td><a href='#ConstantScoreQuery_boost'>boost</a></td><td></td><td>1.0</td></tr></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#RangeFilter'>RangeFilter</a> | <a href='#CachedFilter'>CachedFilter</a> | <a href='#TermsFilter'>TermsFilter</a> | <a href='#BooleanFilter'>BooleanFilter</a> | <a href='#DuplicateFilter'>DuplicateFilter</a>)*</p><a name='ConstantScoreQuery_boost'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#RangeFilter'>RangeFilter</a> | <a href='#NumericRangeFilter'>NumericRangeFilter</a> | <a href='#CachedFilter'>CachedFilter</a> | <a href='#TermsFilter'>TermsFilter</a> | <a href='#BooleanFilter'>BooleanFilter</a> | <a href='#DuplicateFilter'>DuplicateFilter</a>)*</p><a name='ConstantScoreQuery_boost'></a>
<br /><table class='attributeTitle' summary="boost"><tr><td class='leftAttributeTitle'>
@boost</td><td class='rightAttributeTitle'>
Attribute of <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>
@ -722,7 +863,7 @@ Attribute of <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>
<p>Optional boost for matches on this query. Values > 1</p><p><span class='inTextTitle'>Default value</span>: 1.0</p><a name='FuzzyLikeThisQuery'></a>
<br /><table class='elementTitle' summary="FuzzyLikeThisQuery"><tr><td class='leftElementTitle'>
&lt;FuzzyLikeThisQuery&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#BoostQuery'>BoostQuery</a>, <a href='#Query'>Query</a>, <a href='#Clause'>Clause</a>
Child of <a href='#BoostQuery'>BoostQuery</a>, <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
</td></tr></table>
<p>Performs fuzzy matching on "significant" terms in fields. Improves on "LikeThisQuery" by allowing for fuzzy variations of supplied fields.
Improves on FuzzyQuery by rewarding all fuzzy variants of a term with the same IDF rather than default fuzzy behaviour which ranks rarer
@ -803,7 +944,7 @@ Attribute of <a href='#Field'>Field</a>
<p>fieldName must be defined here or is taken from the most immediate parent XML element that defines a "fieldName" attribute</p><a name='LikeThisQuery'></a>
<br /><table class='elementTitle' summary="LikeThisQuery"><tr><td class='leftElementTitle'>
&lt;LikeThisQuery&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#BoostQuery'>BoostQuery</a>, <a href='#Query'>Query</a>, <a href='#Clause'>Clause</a>
Child of <a href='#BoostQuery'>BoostQuery</a>, <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
</td></tr></table>
<p>Cherry-picks "significant" terms from the example child text and queries using these words. By only using significant (read: rare) terms the
performance cost of the query is substantially reduced and large bodies of text can be used as example content.</p><p><span class='inTextTitle'>Example:</span> <em>Use a block of text as an example of the type of content to be found, ignoring the "Reuters" word which
@ -868,7 +1009,7 @@ Attribute of <a href='#LikeThisQuery'>LikeThisQuery</a>
Values must be between 1 and 100</p><p><span class='inTextTitle'>Default value</span>: 30</p><a name='BoostingQuery'></a>
<br /><table class='elementTitle' summary="BoostingQuery"><tr><td class='leftElementTitle'>
&lt;BoostingQuery&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#BoostQuery'>BoostQuery</a>, <a href='#Query'>Query</a>, <a href='#Clause'>Clause</a>
Child of <a href='#BoostQuery'>BoostQuery</a>, <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
</td></tr></table>
<p>Requires matches on the "Query" element and optionally boosts by any matches on the "BoostQuery".
Unlike a regular BooleanQuery the boost can be less than 1 to produce a subtractive rather than additive result
@ -927,11 +1068,13 @@ Child of <a href='#BoostingQuery'>BoostingQuery</a>
</thead>
<tbody><tr><td><a href='#BooleanQuery'>BooleanQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#BoostingQuery'>BoostingQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#ConstantScoreQuery'>ConstantScoreQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#FilteredQuery'>FilteredQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#FuzzyLikeThisQuery'>FuzzyLikeThisQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#LikeThisQuery'>LikeThisQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#NumericRangeQuery'>NumericRangeQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNot'>SpanNot</a></td><td>One or none</td></tr>
@ -949,7 +1092,7 @@ Child of <a href='#BoostingQuery'>BoostingQuery</a>
<th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
<tr><th colspan='3' height='1' class='ruler'></th></tr>
<tr><td><a href='#BoostQuery_boost'>boost</a></td><td></td><td>1.0</td></tr></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#BooleanQuery'>BooleanQuery</a> | <a href='#UserQuery'>UserQuery</a> | <a href='#FilteredQuery'>FilteredQuery</a> | <a href='#TermQuery'>TermQuery</a> | <a href='#TermsQuery'>TermsQuery</a> | <a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a> | <a href='#ConstantScoreQuery'>ConstantScoreQuery</a> | <a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#LikeThisQuery'>LikeThisQuery</a> | <a href='#BoostingQuery'>BoostingQuery</a> | <a href='#FuzzyLikeThisQuery'>FuzzyLikeThisQuery</a>)</p><a name='BoostQuery_boost'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#BooleanQuery'>BooleanQuery</a> | <a href='#UserQuery'>UserQuery</a> | <a href='#FilteredQuery'>FilteredQuery</a> | <a href='#TermQuery'>TermQuery</a> | <a href='#TermsQuery'>TermsQuery</a> | <a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a> | <a href='#ConstantScoreQuery'>ConstantScoreQuery</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a> | <a href='#NumericRangeQuery'>NumericRangeQuery</a> | <a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a> | <a href='#LikeThisQuery'>LikeThisQuery</a> | <a href='#BoostingQuery'>BoostingQuery</a> | <a href='#FuzzyLikeThisQuery'>FuzzyLikeThisQuery</a>)</p><a name='BoostQuery_boost'></a>
<br /><table class='attributeTitle' summary="boost"><tr><td class='leftAttributeTitle'>
@boost</td><td class='rightAttributeTitle'>
Attribute of <a href='#BoostQuery'>BoostQuery</a>
@ -958,7 +1101,7 @@ Attribute of <a href='#BoostQuery'>BoostQuery</a>
effectively demotes results from Query that match this BoostQuery.</p><p><span class='inTextTitle'>Default value</span>: 1.0</p><a name='DuplicateFilter'></a>
<br /><table class='elementTitle' summary="DuplicateFilter"><tr><td class='leftElementTitle'>
&lt;DuplicateFilter/&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>, <a href='#Filter'>Filter</a>, <a href='#Clause'>Clause</a>
Child of <a href='#Clause'>Clause</a>, <a href='#Filter'>Filter</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>
</td></tr></table>
<p>Removes duplicated documents from results where "duplicate" means documents share a value for a particular field such as a primary key</p><p><span class='inTextTitle'>Example:</span> <em>Find the latest version of each web page that mentions "Lucene"</em>
</p><pre>
@ -1000,7 +1143,7 @@ assuming every document is a duplicate then finds the "master" documents to keep
unique and unmarks those documents that are a copy.</p><p><span class='inTextTitle'>Possible values</span>: full, fast - <span class='inTextTitle'>Default value</span>: full</p><a name='TermsFilter'></a>
<br /><table class='elementTitle' summary="TermsFilter"><tr><td class='leftElementTitle'>
&lt;TermsFilter&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>, <a href='#Filter'>Filter</a>, <a href='#Clause'>Clause</a>
Child of <a href='#Clause'>Clause</a>, <a href='#Filter'>Filter</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>
</td></tr></table>
<p>Processes child text using a field-specific choice of Analyzer to produce a set of terms that are then used as a filter.</p><p><span class='inTextTitle'>Example:</span> <em>Find documents talking about Lucene written on a Monday or a Friday</em>
</p><pre>
@ -1029,7 +1172,7 @@ Attribute of <a href='#TermsFilter'>TermsFilter</a>
<p>fieldName must be defined here or is taken from the most immediate parent XML element that defines a "fieldName" attribute</p><a name='BooleanFilter'></a>
<br /><table class='elementTitle' summary="BooleanFilter"><tr><td class='leftElementTitle'>
&lt;BooleanFilter&gt;</td><td class='rightElementTitle'>
Child of <a href='#CachedFilter'>CachedFilter</a>, <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>, <a href='#Filter'>Filter</a>, <a href='#Clause'>Clause</a>
Child of <a href='#Clause'>Clause</a>, <a href='#Filter'>Filter</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>
</td></tr></table>
<p>A Filter equivalent to BooleanQuery that applies Boolean logic to Clauses containing Filters.
Unlike BooleanQuery a BooleanFilter can contain a single "mustNot" clause.</p><p><span class='inTextTitle'>Example:</span> <em>Find documents from the first quarter of this year or last year that are not in "draft" status</em>

View File

@ -41,13 +41,13 @@
<tr>
<td>coreSpanQueries</td>
<td>
SpanOr|SpanNear|SpanOrTerms|SpanFirst|SpanNot|SpanTerm
SpanOr|SpanNear|SpanOrTerms|SpanFirst|SpanNot|SpanTerm|BoostingTermQuery
</td>
</tr>
<tr>
<td>coreFilters</td>
<td>
RangeFilter|CachedFilter
RangeFilter|NumericRangeFilter|CachedFilter
</td>
</tr>
<tr>
@ -59,7 +59,7 @@ RangeFilter|CachedFilter
<tr>
<td>coreQueries</td>
<td>
BooleanQuery|UserQuery|FilteredQuery|TermQuery|TermsQuery|MatchAllDocsQuery|ConstantScoreQuery
BooleanQuery|UserQuery|FilteredQuery|TermQuery|TermsQuery|MatchAllDocsQuery|ConstantScoreQuery|BoostingTermQuery|NumericRangeQuery
</td>
</tr>
</tbody>

View File

@ -41,7 +41,7 @@ positions in relation to each other and the documents containing them.</p><p>Cor
<a name='BooleanQuery'></a>
<br /><table class='elementTitle' summary="BooleanQuery"><tr><td class='leftElementTitle'>
&lt;BooleanQuery&gt;</td><td class='rightElementTitle'>
Child of <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
Child of <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#CachedFilter'>CachedFilter</a>
</td></tr></table>
<p>BooleanQuerys implement Boolean logic which controls how multiple Clauses should be interpreted.
Some clauses may represent optional Query criteria while others represent mandatory criteria.</p><p><span class='inTextTitle'>Example:</span> <em>Find articles about banks, preferably talking about mergers but nothing to do with "sumitomo"</em>
@ -110,10 +110,13 @@ child elements - while in a &lt;BooleanFilter> clause only "filter" types can be
<tr><th colspan='2' height='1' class='ruler'></th></tr>
</thead>
<tbody><tr><td><a href='#BooleanQuery'>BooleanQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#CachedFilter'>CachedFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#ConstantScoreQuery'>ConstantScoreQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#FilteredQuery'>FilteredQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#NumericRangeFilter'>NumericRangeFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#NumericRangeQuery'>NumericRangeQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#RangeFilter'>RangeFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
@ -132,7 +135,7 @@ child elements - while in a &lt;BooleanFilter> clause only "filter" types can be
<th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
<tr><th colspan='3' height='1' class='ruler'></th></tr>
<tr><td><a href='#Clause_occurs'>occurs</a></td><td>should, must, mustnot</td><td>should</td></tr></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#BooleanQuery'>BooleanQuery</a> | <a href='#UserQuery'>UserQuery</a> | <a href='#FilteredQuery'>FilteredQuery</a> | <a href='#TermQuery'>TermQuery</a> | <a href='#TermsQuery'>TermsQuery</a> | <a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a> | <a href='#ConstantScoreQuery'>ConstantScoreQuery</a> | <a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#RangeFilter'>RangeFilter</a> | <a href='#CachedFilter'>CachedFilter</a>)</p><a name='Clause_occurs'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#BooleanQuery'>BooleanQuery</a> | <a href='#UserQuery'>UserQuery</a> | <a href='#FilteredQuery'>FilteredQuery</a> | <a href='#TermQuery'>TermQuery</a> | <a href='#TermsQuery'>TermsQuery</a> | <a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a> | <a href='#ConstantScoreQuery'>ConstantScoreQuery</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a> | <a href='#NumericRangeQuery'>NumericRangeQuery</a> | <a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a> | <a href='#RangeFilter'>RangeFilter</a> | <a href='#NumericRangeFilter'>NumericRangeFilter</a> | <a href='#CachedFilter'>CachedFilter</a>)</p><a name='Clause_occurs'></a>
<br /><table class='attributeTitle' summary="occurs"><tr><td class='leftAttributeTitle'>
@occurs</td><td class='rightAttributeTitle'>
Attribute of <a href='#Clause'>Clause</a>
@ -140,7 +143,7 @@ Attribute of <a href='#Clause'>Clause</a>
<p>Controls if the clause is optional (should), mandatory (must) or unacceptable (mustNot)</p><p><span class='inTextTitle'>Possible values</span>: should, must, mustnot - <span class='inTextTitle'>Default value</span>: should</p><a name='CachedFilter'></a>
<br /><table class='elementTitle' summary="CachedFilter"><tr><td class='leftElementTitle'>
&lt;CachedFilter&gt;</td><td class='rightElementTitle'>
Child of <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>, <a href='#Clause'>Clause</a>, <a href='#Filter'>Filter</a>
Child of <a href='#Clause'>Clause</a>, <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>, <a href='#Filter'>Filter</a>
</td></tr></table>
<p>Caches any nested query or filter in an LRU (Least recently used) Cache. Cached queries, like filters, are turned into
Bitsets at a cost of 1 bit per document in the index. The memory cost of a cached query/filter is therefore numberOfDocsinIndex/8 bytes.
@ -167,10 +170,13 @@ RAM to eliminate the cost of building this filter from disk for every query</em>
<tr><th colspan='2' height='1' class='ruler'></th></tr>
</thead>
<tbody><tr><td><a href='#BooleanQuery'>BooleanQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#CachedFilter'>CachedFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#ConstantScoreQuery'>ConstantScoreQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#FilteredQuery'>FilteredQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#NumericRangeFilter'>NumericRangeFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#NumericRangeQuery'>NumericRangeQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#RangeFilter'>RangeFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
@ -182,10 +188,10 @@ RAM to eliminate the cost of building this filter from disk for every query</em>
<tr><td><a href='#TermsQuery'>TermsQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#UserQuery'>UserQuery</a></td><td>One or none</td></tr>
</tbody></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#BooleanQuery'>BooleanQuery</a> | <a href='#UserQuery'>UserQuery</a> | <a href='#FilteredQuery'>FilteredQuery</a> | <a href='#TermQuery'>TermQuery</a> | <a href='#TermsQuery'>TermsQuery</a> | <a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a> | <a href='#ConstantScoreQuery'>ConstantScoreQuery</a> | <a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#RangeFilter'>RangeFilter</a> | <a href='#CachedFilter'>CachedFilter</a>)</p><a name='UserQuery'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#BooleanQuery'>BooleanQuery</a> | <a href='#UserQuery'>UserQuery</a> | <a href='#FilteredQuery'>FilteredQuery</a> | <a href='#TermQuery'>TermQuery</a> | <a href='#TermsQuery'>TermsQuery</a> | <a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a> | <a href='#ConstantScoreQuery'>ConstantScoreQuery</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a> | <a href='#NumericRangeQuery'>NumericRangeQuery</a> | <a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a> | <a href='#RangeFilter'>RangeFilter</a> | <a href='#NumericRangeFilter'>NumericRangeFilter</a> | <a href='#CachedFilter'>CachedFilter</a>)</p><a name='UserQuery'></a>
<br /><table class='elementTitle' summary="UserQuery"><tr><td class='leftElementTitle'>
&lt;UserQuery&gt;</td><td class='rightElementTitle'>
Child of <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
Child of <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#CachedFilter'>CachedFilter</a>
</td></tr></table>
<p>Passes content directly through to the standard LuceneQuery parser see "Lucene Query Syntax"</p><p><span class='inTextTitle'>Example:</span> <em>Search for documents about John Smith or John Doe using standard LuceneQuerySyntax</em>
</p><pre>
@ -212,7 +218,7 @@ Attribute of <a href='#UserQuery'>UserQuery</a>
<p>fieldName can optionally be defined here to change the default field used in the QueryParser</p><a name='MatchAllDocsQuery'></a>
<br /><table class='elementTitle' summary="MatchAllDocsQuery"><tr><td class='leftElementTitle'>
&lt;MatchAllDocsQuery/&gt;</td><td class='rightElementTitle'>
Child of <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
Child of <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#CachedFilter'>CachedFilter</a>
</td></tr></table>
<p>A query which is used to match all documents. This has a couple of uses:
<ol>
@ -233,7 +239,7 @@ used to select content rather than it's usual role of filtering the results of a
</pre><p></p><p class='emptyTagNote'>This element is always empty.</p><a name='TermQuery'></a>
<br /><table class='elementTitle' summary="TermQuery"><tr><td class='leftElementTitle'>
&lt;TermQuery&gt;</td><td class='rightElementTitle'>
Child of <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
Child of <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#CachedFilter'>CachedFilter</a>
</td></tr></table>
<p>a single term query - no analysis is done of the child text</p><p><span class='inTextTitle'>Example:</span> <em>Match on a primary key</em>
</p><pre>
@ -257,10 +263,25 @@ Attribute of <a href='#TermQuery'>TermQuery</a>
@fieldName</td><td class='rightAttributeTitle'>
Attribute of <a href='#TermQuery'>TermQuery</a>
</td></tr></table>
<p>fieldName must be defined here or is taken from the most immediate parent XML element that defines a "fieldName" attribute</p><a name='BoostingTermQuery'></a>
<br /><table class='elementTitle' summary="BoostingTermQuery"><tr><td class='leftElementTitle'>
&lt;BoostingTermQuery&gt;</td><td class='rightElementTitle'>
Child of <a href='#Include'>Include</a>, <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#SpanOr'>SpanOr</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Exclude'>Exclude</a>, <a href='#CachedFilter'>CachedFilter</a>
</td></tr></table>
<p>A boosted term query - no analysis is done of the child text. Also a span member.</p><p>(Text below is copied from the javadocs of BoostingTermQuery)</p><p>The BoostingTermQuery is very similar to the {</p><a name='TermQuery_boost'></a>
<br /><table class='attributeTitle' summary="boost"><tr><td class='leftAttributeTitle'>
@boost</td><td class='rightAttributeTitle'>
Attribute of <a href='#TermQuery'>TermQuery</a>
</td></tr></table>
<p>Optional boost for matches on this query. Values > 1</p><p><span class='inTextTitle'>Default value</span>: 1.0</p><a name='TermQuery_fieldName'></a>
<br /><table class='attributeTitle' summary="fieldName"><tr><td class='leftAttributeTitle'>
@fieldName</td><td class='rightAttributeTitle'>
Attribute of <a href='#TermQuery'>TermQuery</a>
</td></tr></table>
<p>fieldName must be defined here or is taken from the most immediate parent XML element that defines a "fieldName" attribute</p><a name='TermsQuery'></a>
<br /><table class='elementTitle' summary="TermsQuery"><tr><td class='leftElementTitle'>
&lt;TermsQuery&gt;</td><td class='rightElementTitle'>
Child of <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
Child of <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#CachedFilter'>CachedFilter</a>
</td></tr></table>
<p>The equivalent of a BooleanQuery with multiple optional TermQuery clauses.
Child text is analyzed using a field-specific choice of Analyzer to produce a set of terms that are ORed together in Boolean logic.
@ -301,7 +322,7 @@ Attribute of <a href='#TermsQuery'>TermsQuery</a>
<p>The minimum number of terms that should be present in any one document before it is considered to be a match.</p><p><span class='inTextTitle'>Default value</span>: 0</p><a name='FilteredQuery'></a>
<br /><table class='elementTitle' summary="FilteredQuery"><tr><td class='leftElementTitle'>
&lt;FilteredQuery&gt;</td><td class='rightElementTitle'>
Child of <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
Child of <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#CachedFilter'>CachedFilter</a>
</td></tr></table>
<p>Runs a Query and filters results to only those query matches that also match the Filter element.</p><p><span class='inTextTitle'>Example:</span> <em>Find all documents about Lucene that have a status of "published"</em>
</p><pre>
@ -350,9 +371,11 @@ Child of <a href='#FilteredQuery'>FilteredQuery</a>
<tr><th colspan='2' height='1' class='ruler'></th></tr>
</thead>
<tbody><tr><td><a href='#BooleanQuery'>BooleanQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#ConstantScoreQuery'>ConstantScoreQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#FilteredQuery'>FilteredQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#NumericRangeQuery'>NumericRangeQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNot'>SpanNot</a></td><td>One or none</td></tr>
@ -363,7 +386,7 @@ Child of <a href='#FilteredQuery'>FilteredQuery</a>
<tr><td><a href='#TermsQuery'>TermsQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#UserQuery'>UserQuery</a></td><td>One or none</td></tr>
</tbody></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#BooleanQuery'>BooleanQuery</a> | <a href='#UserQuery'>UserQuery</a> | <a href='#FilteredQuery'>FilteredQuery</a> | <a href='#TermQuery'>TermQuery</a> | <a href='#TermsQuery'>TermsQuery</a> | <a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a> | <a href='#ConstantScoreQuery'>ConstantScoreQuery</a> | <a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a>)</p><a name='Filter'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#BooleanQuery'>BooleanQuery</a> | <a href='#UserQuery'>UserQuery</a> | <a href='#FilteredQuery'>FilteredQuery</a> | <a href='#TermQuery'>TermQuery</a> | <a href='#TermsQuery'>TermsQuery</a> | <a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a> | <a href='#ConstantScoreQuery'>ConstantScoreQuery</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a> | <a href='#NumericRangeQuery'>NumericRangeQuery</a> | <a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a>)</p><a name='Filter'></a>
<br /><table class='elementTitle' summary="Filter"><tr><td class='leftElementTitle'>
&lt;Filter&gt;</td><td class='rightElementTitle'>
Child of <a href='#FilteredQuery'>FilteredQuery</a>
@ -377,12 +400,13 @@ Child of <a href='#FilteredQuery'>FilteredQuery</a>
<tr><th colspan='2' height='1' class='ruler'></th></tr>
</thead>
<tbody><tr><td><a href='#CachedFilter'>CachedFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#NumericRangeFilter'>NumericRangeFilter</a></td><td>One or none</td></tr>
<tr><td><a href='#RangeFilter'>RangeFilter</a></td><td>One or none</td></tr>
</tbody></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#RangeFilter'>RangeFilter</a> | <a href='#CachedFilter'>CachedFilter</a>)</p><a name='RangeFilter'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#RangeFilter'>RangeFilter</a> | <a href='#NumericRangeFilter'>NumericRangeFilter</a> | <a href='#CachedFilter'>CachedFilter</a>)</p><a name='RangeFilter'></a>
<br /><table class='elementTitle' summary="RangeFilter"><tr><td class='leftElementTitle'>
&lt;RangeFilter/&gt;</td><td class='rightElementTitle'>
Child of <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>, <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Filter'>Filter</a>
Child of <a href='#Clause'>Clause</a>, <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>, <a href='#Filter'>Filter</a>, <a href='#CachedFilter'>CachedFilter</a>
</td></tr></table>
<p>Filter used to limit query results to documents matching a range of field values</p><p><span class='inTextTitle'>Example:</span> <em>Search for documents about banks from the last 10 years</em>
</p><pre>
@ -428,10 +452,121 @@ Attribute of <a href='#RangeFilter'>RangeFilter</a>
@includeUpper</td><td class='rightAttributeTitle'>
Attribute of <a href='#RangeFilter'>RangeFilter</a>
</td></tr></table>
<p>Controls if the upperTerm in the range is part of the allowed set of values</p><p><span class='inTextTitle'>Possible values</span>: true, false - <span class='inTextTitle'>Default value</span>: true</p><a name='SpanTerm'></a>
<p>Controls if the upperTerm in the range is part of the allowed set of values</p><p><span class='inTextTitle'>Possible values</span>: true, false - <span class='inTextTitle'>Default value</span>: true</p><a name='NumericRangeQuery'></a>
<br /><table class='elementTitle' summary="NumericRangeQuery"><tr><td class='leftElementTitle'>
&lt;NumericRangeQuery/&gt;</td><td class='rightElementTitle'>
Child of <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#CachedFilter'>CachedFilter</a>
</td></tr></table>
<p>A Query that matches numeric values within a specified range.</p><p><span class='inTextTitle'>Example:</span> <em>Search for documents about people who are aged 20-25</em>
</p><pre>
&lt;NumericRangeQuery fieldName="age" lowerTerm="20" upperTerm="25" /&gt;
</pre><p></p><blockquote>
<table summary="&lt;NumericRangeQuery&gt;'s attributes"><tr>
<th class='title' colspan='3'>&lt;NumericRangeQuery&gt;'s attributes</th>
</tr>
<tr><th colspan='3' height='1' class='ruler'></th></tr>
<tr>
<th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
<tr><th colspan='3' height='1' class='ruler'></th></tr>
<tr><td><a href='#NumericRangeQuery_fieldName'>fieldName</a></td><td></td><td></td></tr><tr><td><a href='#NumericRangeQuery_includeLower'>includeLower</a></td><td>true, false</td><td>true</td></tr><tr><td><a href='#NumericRangeQuery_includeUpper'>includeUpper</a></td><td>true, false</td><td>true</td></tr><tr><td><a href='#NumericRangeQuery_lowerTerm'>lowerTerm</a></td><td></td><td></td></tr><tr><td><a href='#NumericRangeQuery_precisionStep'>precisionStep</a></td><td></td><td>4</td></tr><tr><td><a href='#NumericRangeQuery_type'>type</a></td><td>int, long, float, double</td><td>int</td></tr><tr><td><a href='#NumericRangeQuery_upperTerm'>upperTerm</a></td><td></td><td></td></tr></table></blockquote>
<p class='emptyTagNote'>This element is always empty.</p><a name='NumericRangeQuery_fieldName'></a>
<br /><table class='attributeTitle' summary="fieldName"><tr><td class='leftAttributeTitle'>
@fieldName</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
</td></tr></table>
<p>fieldName must be defined here or is taken from the most immediate parent XML element that defines a "fieldName" attribute</p><a name='NumericRangeQuery_lowerTerm'></a>
<br /><table class='attributeTitle' summary="lowerTerm"><tr><td class='leftAttributeTitle'>
@lowerTerm</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
</td></tr></table>
<p>The lower-most term value for this field (must be &lt;= upperTerm and a valid native java numeric type)</p><p><span class='inTextTitle'>Required</span></p><a name='NumericRangeQuery_upperTerm'></a>
<br /><table class='attributeTitle' summary="upperTerm"><tr><td class='leftAttributeTitle'>
@upperTerm</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
</td></tr></table>
<p>The upper-most term value for this field (must be >= lowerTerm and a valid native java numeric type)</p><p><span class='inTextTitle'>Required</span></p><a name='NumericRangeQuery_type'></a>
<br /><table class='attributeTitle' summary="type"><tr><td class='leftAttributeTitle'>
@type</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
</td></tr></table>
<p>The numeric type of this field</p><p><span class='inTextTitle'>Possible values</span>: int, long, float, double - <span class='inTextTitle'>Default value</span>: int</p><a name='NumericRangeQuery_includeLower'></a>
<br /><table class='attributeTitle' summary="includeLower"><tr><td class='leftAttributeTitle'>
@includeLower</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
</td></tr></table>
<p>Controls if the lowerTerm in the range is part of the allowed set of values</p><p><span class='inTextTitle'>Possible values</span>: true, false - <span class='inTextTitle'>Default value</span>: true</p><a name='NumericRangeQuery_includeUpper'></a>
<br /><table class='attributeTitle' summary="includeUpper"><tr><td class='leftAttributeTitle'>
@includeUpper</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
</td></tr></table>
<p>Controls if the upperTerm in the range is part of the allowed set of values</p><p><span class='inTextTitle'>Possible values</span>: true, false - <span class='inTextTitle'>Default value</span>: true</p><a name='NumericRangeQuery_precisionStep'></a>
<br /><table class='attributeTitle' summary="precisionStep"><tr><td class='leftAttributeTitle'>
@precisionStep</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
</td></tr></table>
<p>Lower step values mean more precisions and so more terms in index (and index gets larger). This value must be an integer</p><p><span class='inTextTitle'>Default value</span>: 4</p><a name='NumericRangeFilter'></a>
<br /><table class='elementTitle' summary="NumericRangeFilter"><tr><td class='leftElementTitle'>
&lt;NumericRangeFilter/&gt;</td><td class='rightElementTitle'>
Child of <a href='#Clause'>Clause</a>, <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>, <a href='#Filter'>Filter</a>, <a href='#CachedFilter'>CachedFilter</a>
</td></tr></table>
<p>A Filter that only accepts numeric values within a specified range</p><p><span class='inTextTitle'>Example:</span> <em>Search for documents about people who are aged 20-25</em>
</p><pre>
&lt;FilteredQuery&gt;
&lt;Query&gt;
&lt;UserQuery&gt;person&lt;/UserQuery&gt;
&lt;/Query&gt;
&lt;Filter&gt;
&lt;NumericRangeFilter fieldName="age" lowerTerm="20" upperTerm="25"/&gt;
&lt;/Filter&gt;
&lt;/FilteredQuery&gt;
</pre><p></p><blockquote>
<table summary="&lt;NumericRangeFilter&gt;'s attributes"><tr>
<th class='title' colspan='3'>&lt;NumericRangeFilter&gt;'s attributes</th>
</tr>
<tr><th colspan='3' height='1' class='ruler'></th></tr>
<tr>
<th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
<tr><th colspan='3' height='1' class='ruler'></th></tr>
<tr><td><a href='#NumericRangeFilter_fieldName'>fieldName</a></td><td></td><td></td></tr><tr><td><a href='#NumericRangeFilter_includeLower'>includeLower</a></td><td>true, false</td><td>true</td></tr><tr><td><a href='#NumericRangeFilter_includeUpper'>includeUpper</a></td><td>true, false</td><td>true</td></tr><tr><td><a href='#NumericRangeFilter_lowerTerm'>lowerTerm</a></td><td></td><td></td></tr><tr><td><a href='#NumericRangeFilter_precisionStep'>precisionStep</a></td><td></td><td>4</td></tr><tr><td><a href='#NumericRangeFilter_type'>type</a></td><td>int, long, float, double</td><td>int</td></tr><tr><td><a href='#NumericRangeFilter_upperTerm'>upperTerm</a></td><td></td><td></td></tr></table></blockquote>
<p class='emptyTagNote'>This element is always empty.</p><a name='NumericRangeFilter_fieldName'></a>
<br /><table class='attributeTitle' summary="fieldName"><tr><td class='leftAttributeTitle'>
@fieldName</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
</td></tr></table>
<p>fieldName must be defined here or is taken from the most immediate parent XML element that defines a "fieldName" attribute</p><a name='NumericRangeFilter_lowerTerm'></a>
<br /><table class='attributeTitle' summary="lowerTerm"><tr><td class='leftAttributeTitle'>
@lowerTerm</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
</td></tr></table>
<p>The lower-most term value for this field (must be &lt;= upperTerm and a valid native java numeric type)</p><p><span class='inTextTitle'>Required</span></p><a name='NumericRangeFilter_upperTerm'></a>
<br /><table class='attributeTitle' summary="upperTerm"><tr><td class='leftAttributeTitle'>
@upperTerm</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
</td></tr></table>
<p>The upper-most term value for this field (must be >= lowerTerm and a valid native java numeric type)</p><p><span class='inTextTitle'>Required</span></p><a name='NumericRangeFilter_type'></a>
<br /><table class='attributeTitle' summary="type"><tr><td class='leftAttributeTitle'>
@type</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
</td></tr></table>
<p>The numeric type of this field</p><p><span class='inTextTitle'>Possible values</span>: int, long, float, double - <span class='inTextTitle'>Default value</span>: int</p><a name='NumericRangeFilter_includeLower'></a>
<br /><table class='attributeTitle' summary="includeLower"><tr><td class='leftAttributeTitle'>
@includeLower</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
</td></tr></table>
<p>Controls if the lowerTerm in the range is part of the allowed set of values</p><p><span class='inTextTitle'>Possible values</span>: true, false - <span class='inTextTitle'>Default value</span>: true</p><a name='NumericRangeFilter_includeUpper'></a>
<br /><table class='attributeTitle' summary="includeUpper"><tr><td class='leftAttributeTitle'>
@includeUpper</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
</td></tr></table>
<p>Controls if the upperTerm in the range is part of the allowed set of values</p><p><span class='inTextTitle'>Possible values</span>: true, false - <span class='inTextTitle'>Default value</span>: true</p><a name='NumericRangeFilter_precisionStep'></a>
<br /><table class='attributeTitle' summary="precisionStep"><tr><td class='leftAttributeTitle'>
@precisionStep</td><td class='rightAttributeTitle'>
Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
</td></tr></table>
<p>Lower step values mean more precisions and so more terms in index (and index gets larger). This value must be an integer</p><p><span class='inTextTitle'>Default value</span>: 4</p><a name='SpanTerm'></a>
<br /><table class='elementTitle' summary="SpanTerm"><tr><td class='leftElementTitle'>
&lt;SpanTerm&gt;</td><td class='rightElementTitle'>
Child of <a href='#SpanOr'>SpanOr</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Exclude'>Exclude</a>, <a href='#Clause'>Clause</a>, <a href='#Include'>Include</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#Query'>Query</a>
Child of <a href='#Include'>Include</a>, <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#SpanOr'>SpanOr</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Exclude'>Exclude</a>, <a href='#CachedFilter'>CachedFilter</a>
</td></tr></table>
<p>A single term used in a SpanQuery. These clauses are the building blocks for more complex "span" queries which test word proximity</p><p><span class='inTextTitle'>Example:</span> <em>Find documents using terms close to each other about mining and accidents</em>
</p><pre>
@ -464,7 +599,7 @@ Attribute of <a href='#SpanTerm'>SpanTerm</a>
<p>fieldName must be defined here or is taken from the most immediate parent XML element that defines a "fieldName" attribute</p><p><span class='inTextTitle'>Required</span></p><a name='SpanOrTerms'></a>
<br /><table class='elementTitle' summary="SpanOrTerms"><tr><td class='leftElementTitle'>
&lt;SpanOrTerms&gt;</td><td class='rightElementTitle'>
Child of <a href='#SpanOr'>SpanOr</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Exclude'>Exclude</a>, <a href='#Clause'>Clause</a>, <a href='#Include'>Include</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#Query'>Query</a>
Child of <a href='#Include'>Include</a>, <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#SpanOr'>SpanOr</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Exclude'>Exclude</a>, <a href='#CachedFilter'>CachedFilter</a>
</td></tr></table>
<p>A field-specific analyzer is used here to parse the child text provided in this tag. The SpanTerms produced are ORed in terms of Boolean logic</p><p><span class='inTextTitle'>Example:</span> <em>Use SpanOrTerms as a more convenient/succinct way of expressing multiple choices of SpanTerms. This example looks for reports
using words describing a fatality near to references to miners</em>
@ -490,7 +625,7 @@ Attribute of <a href='#SpanOrTerms'>SpanOrTerms</a>
<p>fieldName must be defined here or is taken from the most immediate parent XML element that defines a "fieldName" attribute</p><p><span class='inTextTitle'>Required</span></p><a name='SpanOr'></a>
<br /><table class='elementTitle' summary="SpanOr"><tr><td class='leftElementTitle'>
&lt;SpanOr&gt;</td><td class='rightElementTitle'>
Child of <a href='#SpanFirst'>SpanFirst</a>, <a href='#Exclude'>Exclude</a>, <a href='#Clause'>Clause</a>, <a href='#Include'>Include</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#Query'>Query</a>
Child of <a href='#Include'>Include</a>, <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Exclude'>Exclude</a>, <a href='#CachedFilter'>CachedFilter</a>
</td></tr></table>
<p>Takes any number of child queries from the Span family</p><p><span class='inTextTitle'>Example:</span> <em>Find documents using terms close to each other about mining and accidents</em>
</p><pre>
@ -514,17 +649,18 @@ Child of <a href='#SpanFirst'>SpanFirst</a>, <a href='#Exclude'>Exclude</a>, <a
<tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
<tr><th colspan='2' height='1' class='ruler'></th></tr>
</thead>
<tbody><tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>Any number</td></tr>
<tbody><tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanNear'>SpanNear</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanNot'>SpanNot</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanOr'>SpanOr</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanOrTerms'>SpanOrTerms</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanTerm'>SpanTerm</a></td><td>Any number</td></tr>
</tbody></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a>)*</p><a name='SpanNear'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a>)*</p><a name='SpanNear'></a>
<br /><table class='elementTitle' summary="SpanNear"><tr><td class='leftElementTitle'>
&lt;SpanNear&gt;</td><td class='rightElementTitle'>
Child of <a href='#SpanOr'>SpanOr</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Exclude'>Exclude</a>, <a href='#Clause'>Clause</a>, <a href='#Include'>Include</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
Child of <a href='#Include'>Include</a>, <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#SpanOr'>SpanOr</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Exclude'>Exclude</a>, <a href='#CachedFilter'>CachedFilter</a>
</td></tr></table>
<p>Takes any number of child queries from the Span family and tests for proximity</p><blockquote><table summary='element info'><tr>
<td class='construct'><table summary="&lt;SpanNear&gt;'s children">
@ -534,7 +670,8 @@ Child of <a href='#SpanOr'>SpanOr</a>, <a href='#SpanFirst'>SpanFirst</a>, <a hr
<tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
<tr><th colspan='2' height='1' class='ruler'></th></tr>
</thead>
<tbody><tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>Any number</td></tr>
<tbody><tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanNear'>SpanNear</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanNot'>SpanNot</a></td><td>Any number</td></tr>
<tr><td><a href='#SpanOr'>SpanOr</a></td><td>Any number</td></tr>
@ -548,7 +685,7 @@ Child of <a href='#SpanOr'>SpanOr</a>, <a href='#SpanFirst'>SpanFirst</a>, <a hr
<th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
<tr><th colspan='3' height='1' class='ruler'></th></tr>
<tr><td><a href='#SpanNear_inOrder'>inOrder</a></td><td>true, false</td><td>true</td></tr><tr><td><a href='#SpanNear_slop'>slop</a></td><td></td><td></td></tr></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a>)*</p><a name='SpanNear_slop'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a>)*</p><a name='SpanNear_slop'></a>
<br /><table class='attributeTitle' summary="slop"><tr><td class='leftAttributeTitle'>
@slop</td><td class='rightAttributeTitle'>
Attribute of <a href='#SpanNear'>SpanNear</a>
@ -575,7 +712,7 @@ Attribute of <a href='#SpanNear'>SpanNear</a>
<p>Controls if matching terms have to appear in the order listed or can be reversed</p><p><span class='inTextTitle'>Possible values</span>: true, false - <span class='inTextTitle'>Default value</span>: true</p><a name='SpanFirst'></a>
<br /><table class='elementTitle' summary="SpanFirst"><tr><td class='leftElementTitle'>
&lt;SpanFirst&gt;</td><td class='rightElementTitle'>
Child of <a href='#SpanOr'>SpanOr</a>, <a href='#Exclude'>Exclude</a>, <a href='#Clause'>Clause</a>, <a href='#Include'>Include</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#Query'>Query</a>
Child of <a href='#Include'>Include</a>, <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#SpanOr'>SpanOr</a>, <a href='#Exclude'>Exclude</a>, <a href='#CachedFilter'>CachedFilter</a>
</td></tr></table>
<p>Looks for a SpanQuery match occuring near the beginning of a document</p><p><span class='inTextTitle'>Example:</span> <em>Find letters where the first 50 words talk about a resignation:</em>
</p><pre>
@ -590,7 +727,8 @@ Child of <a href='#SpanOr'>SpanOr</a>, <a href='#Exclude'>Exclude</a>, <a href='
<tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
<tr><th colspan='2' height='1' class='ruler'></th></tr>
</thead>
<tbody><tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tbody><tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNot'>SpanNot</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanOr'>SpanOr</a></td><td>One or none</td></tr>
@ -604,7 +742,7 @@ Child of <a href='#SpanOr'>SpanOr</a>, <a href='#Exclude'>Exclude</a>, <a href='
<th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
<tr><th colspan='3' height='1' class='ruler'></th></tr>
<tr><td><a href='#SpanFirst_boost'>boost</a></td><td></td><td>1.0</td></tr><tr><td><a href='#SpanFirst_end'>end</a></td><td></td><td></td></tr></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a>)</p><a name='SpanFirst_end'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a>)</p><a name='SpanFirst_end'></a>
<br /><table class='attributeTitle' summary="end"><tr><td class='leftAttributeTitle'>
@end</td><td class='rightAttributeTitle'>
Attribute of <a href='#SpanFirst'>SpanFirst</a>
@ -617,7 +755,7 @@ Attribute of <a href='#SpanFirst'>SpanFirst</a>
<p>Optional boost for matches on this query. Values > 1</p><p><span class='inTextTitle'>Default value</span>: 1.0</p><a name='SpanNot'></a>
<br /><table class='elementTitle' summary="SpanNot"><tr><td class='leftElementTitle'>
&lt;SpanNot&gt;</td><td class='rightElementTitle'>
Child of <a href='#SpanOr'>SpanOr</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Exclude'>Exclude</a>, <a href='#Clause'>Clause</a>, <a href='#Include'>Include</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#Query'>Query</a>
Child of <a href='#Include'>Include</a>, <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#SpanNear'>SpanNear</a>, <a href='#SpanOr'>SpanOr</a>, <a href='#SpanFirst'>SpanFirst</a>, <a href='#Exclude'>Exclude</a>, <a href='#CachedFilter'>CachedFilter</a>
</td></tr></table>
<p>Finds documents matching a SpanQuery but not if matching another SpanQuery</p><p><span class='inTextTitle'>Example:</span> <em>Find documents talking about social services but not containing the word "public"</em>
</p><pre>
@ -656,14 +794,15 @@ Child of <a href='#SpanNot'>SpanNot</a>
<tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
<tr><th colspan='2' height='1' class='ruler'></th></tr>
</thead>
<tbody><tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tbody><tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNot'>SpanNot</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanOr'>SpanOr</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanOrTerms'>SpanOrTerms</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanTerm'>SpanTerm</a></td><td>One or none</td></tr>
</tbody></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a>)</p><a name='Exclude'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a>)</p><a name='Exclude'></a>
<br /><table class='elementTitle' summary="Exclude"><tr><td class='leftElementTitle'>
&lt;Exclude&gt;</td><td class='rightElementTitle'>
Child of <a href='#SpanNot'>SpanNot</a>
@ -676,17 +815,18 @@ Child of <a href='#SpanNot'>SpanNot</a>
<tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
<tr><th colspan='2' height='1' class='ruler'></th></tr>
</thead>
<tbody><tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tbody><tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanNot'>SpanNot</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanOr'>SpanOr</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanOrTerms'>SpanOrTerms</a></td><td>One or none</td></tr>
<tr><td><a href='#SpanTerm'>SpanTerm</a></td><td>One or none</td></tr>
</tbody></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a>)</p><a name='ConstantScoreQuery'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#SpanOr'>SpanOr</a> | <a href='#SpanNear'>SpanNear</a> | <a href='#SpanOrTerms'>SpanOrTerms</a> | <a href='#SpanFirst'>SpanFirst</a> | <a href='#SpanNot'>SpanNot</a> | <a href='#SpanTerm'>SpanTerm</a> | <a href='#BoostingTermQuery'>BoostingTermQuery</a>)</p><a name='ConstantScoreQuery'></a>
<br /><table class='elementTitle' summary="ConstantScoreQuery"><tr><td class='leftElementTitle'>
&lt;ConstantScoreQuery&gt;</td><td class='rightElementTitle'>
Child of <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>, <a href='#Query'>Query</a>
Child of <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#CachedFilter'>CachedFilter</a>
</td></tr></table>
<p>a utility tag to wrap any filter as a query</p><p><span class='inTextTitle'>Example:</span> <em> Find all documents from the last 10 years </em>
</p><pre>
@ -702,6 +842,7 @@ Child of <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>,
<tr><th colspan='2' height='1' class='ruler'></th></tr>
</thead>
<tbody><tr><td><a href='#CachedFilter'>CachedFilter</a></td><td>Any number</td></tr>
<tr><td><a href='#NumericRangeFilter'>NumericRangeFilter</a></td><td>Any number</td></tr>
<tr><td><a href='#RangeFilter'>RangeFilter</a></td><td>Any number</td></tr>
</tbody></table></td><td class='construct'><table summary="&lt;ConstantScoreQuery&gt;'s attributes"><tr>
<th class='title' colspan='3'>&lt;ConstantScoreQuery&gt;'s attributes</th>
@ -711,7 +852,7 @@ Child of <a href='#Clause'>Clause</a>, <a href='#CachedFilter'>CachedFilter</a>,
<th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
<tr><th colspan='3' height='1' class='ruler'></th></tr>
<tr><td><a href='#ConstantScoreQuery_boost'>boost</a></td><td></td><td>1.0</td></tr></table></td></tr></table></blockquote>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#RangeFilter'>RangeFilter</a> | <a href='#CachedFilter'>CachedFilter</a>)*</p><a name='ConstantScoreQuery_boost'></a>
<span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#RangeFilter'>RangeFilter</a> | <a href='#NumericRangeFilter'>NumericRangeFilter</a> | <a href='#CachedFilter'>CachedFilter</a>)*</p><a name='ConstantScoreQuery_boost'></a>
<br /><table class='attributeTitle' summary="boost"><tr><td class='leftAttributeTitle'>
@boost</td><td class='rightAttributeTitle'>
Attribute of <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>

View File

@ -59,9 +59,9 @@
<span class="dtd_comment">--&gt;</span>
<span class="dtd_comment">&lt;!-- </span><span class="dtd_dtddoc_tag">@hidden</span><span class="dtd_comment"> Define core types of XML elements --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ENTITY</span><span class="dtd_plain"> % </span><span class="dtd_attribute_name">coreSpanQueries</span><span class="dtd_plain"> </span><span class="dtd_attribute_value">&quot;SpanOr|SpanNear|SpanOrTerms|SpanFirst|SpanNot|SpanTerm&quot;</span><span class="dtd_plain"> </span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ENTITY</span><span class="dtd_plain"> % </span><span class="dtd_attribute_name">coreQueries</span><span class="dtd_plain"> </span><span class="dtd_attribute_value">&quot;BooleanQuery|UserQuery|FilteredQuery|TermQuery|TermsQuery|MatchAllDocsQuery|ConstantScoreQuery&quot;</span><span class="dtd_plain"> </span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ENTITY</span><span class="dtd_plain"> % </span><span class="dtd_attribute_name">coreFilters</span><span class="dtd_plain"> </span><span class="dtd_attribute_value">&quot;RangeFilter|CachedFilter&quot;</span><span class="dtd_plain"> </span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ENTITY</span><span class="dtd_plain"> % </span><span class="dtd_attribute_name">coreSpanQueries</span><span class="dtd_plain"> </span><span class="dtd_attribute_value">&quot;SpanOr|SpanNear|SpanOrTerms|SpanFirst|SpanNot|SpanTerm|BoostingTermQuery&quot;</span><span class="dtd_plain"> </span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ENTITY</span><span class="dtd_plain"> % </span><span class="dtd_attribute_name">coreQueries</span><span class="dtd_plain"> </span><span class="dtd_attribute_value">&quot;BooleanQuery|UserQuery|FilteredQuery|TermQuery|TermsQuery|MatchAllDocsQuery|ConstantScoreQuery|BoostingTermQuery|NumericRangeQuery&quot;</span><span class="dtd_plain"> </span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ENTITY</span><span class="dtd_plain"> % </span><span class="dtd_attribute_name">coreFilters</span><span class="dtd_plain"> </span><span class="dtd_attribute_value">&quot;RangeFilter|NumericRangeFilter|CachedFilter&quot;</span><span class="dtd_plain"> </span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- </span><span class="dtd_dtddoc_tag">@hidden</span><span class="dtd_comment"> Allow for extensions --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ENTITY</span><span class="dtd_plain"> % </span><span class="dtd_attribute_name">extendedSpanQueries1</span><span class="dtd_plain"> </span><span class="dtd_attribute_value">&quot; &quot;</span><span class="dtd_plain"> </span><span class="dtd_tag_symbols">&gt;</span>
@ -192,6 +192,29 @@
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ATTLIST</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">TermQuery</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">fieldName</span><span class="dtd_plain"> </span><span class="dtd_keyword">CDATA</span><span class="dtd_plain"> </span><span class="dtd_keyword">#IMPLIED</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!--</span>
<span class="dtd_comment"> A boosted term query - no analysis is done of the child text. Also a span member.</span>
<span class="dtd_comment"> (Text below is copied from the javadocs of BoostingTermQuery)</span>
<span class="dtd_comment"> </span>
<span class="dtd_comment"> The BoostingTermQuery is very similar to the {@link org.apache.lucene.search.spans.SpanTermQuery} except</span>
<span class="dtd_comment"> that it factors in the value of the payload located at each of the positions where the</span>
<span class="dtd_comment"> {@link org.apache.lucene.index.Term} occurs.</span>
<span class="dtd_comment"> In order to take advantage of this, you must override {@link org.apache.lucene.search.Similarity#scorePayload(String, byte[],int,int)}</span>
<span class="dtd_comment"> which returns 1 by default.</span>
<span class="dtd_comment"> Payload scores are averaged across term occurrences in the document.</span>
<span class="dtd_comment"> @see org.apache.lucene.search.Similarity#scorePayload(String, byte[], int, int)</span>
<span class="dtd_comment">--&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ELEMENT</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">BoostingTermQuery</span><span class="dtd_plain"> (</span><span class="dtd_keyword">#PCDATA</span><span class="dtd_plain">)</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- Optional boost for matches on this query. Values &gt; 1 --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ATTLIST</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">TermQuery</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">boost</span><span class="dtd_plain"> </span><span class="dtd_keyword">CDATA</span><span class="dtd_plain"> </span><span class="dtd_attribute_value">&quot;1.0&quot;</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- fieldName must be defined here or is taken from the most immediate parent XML element that defines a &quot;fieldName&quot; attribute --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ATTLIST</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">TermQuery</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">fieldName</span><span class="dtd_plain"> </span><span class="dtd_keyword">CDATA</span><span class="dtd_plain"> </span><span class="dtd_keyword">#IMPLIED</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- </span>
<span class="dtd_comment"> The equivalent of a BooleanQuery with multiple optional TermQuery clauses.</span>
@ -266,7 +289,60 @@
<span class="dtd_comment">&lt;!-- Controls if the upperTerm in the range is part of the allowed set of values --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ATTLIST</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">RangeFilter</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">includeUpper</span><span class="dtd_plain"> (</span><span class="dtd_attribute_name">true</span><span class="dtd_plain"> | </span><span class="dtd_attribute_name">false</span><span class="dtd_plain">) </span><span class="dtd_attribute_value">&quot;true&quot;</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!--</span>
<span class="dtd_comment"> A Query that matches numeric values within a specified range.</span>
<span class="dtd_comment"> </span><span class="dtd_dtddoc_tag">@example</span><span class="dtd_comment"> </span>
<span class="dtd_comment"> &lt;em&gt;Search for documents about people who are aged 20-25&lt;/em&gt;</span>
<span class="dtd_comment"> % </span>
<span class="dtd_comment"> &lt;NumericRangeQuery fieldName=&quot;age&quot; lowerTerm=&quot;20&quot; upperTerm=&quot;25&quot; /&gt;</span>
<span class="dtd_comment"> %</span>
<span class="dtd_comment"> --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ELEMENT</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">NumericRangeQuery</span><span class="dtd_plain"> </span><span class="dtd_keyword">EMPTY</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- fieldName must be defined here or is taken from the most immediate parent XML element that defines a &quot;fieldName&quot; attribute --&gt;</span><span class="dtd_plain"> </span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ATTLIST</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">NumericRangeQuery</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">fieldName</span><span class="dtd_plain"> </span><span class="dtd_keyword">CDATA</span><span class="dtd_plain"> </span><span class="dtd_keyword">#IMPLIED</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- The lower-most term value for this field (must be &lt;= upperTerm and a valid native java numeric type) --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ATTLIST</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">NumericRangeQuery</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">lowerTerm</span><span class="dtd_plain"> </span><span class="dtd_keyword">CDATA</span><span class="dtd_plain"> </span><span class="dtd_keyword">#REQUIRED</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- The upper-most term value for this field (must be &gt;= lowerTerm and a valid native java numeric type) --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ATTLIST</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">NumericRangeQuery</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">upperTerm</span><span class="dtd_plain"> </span><span class="dtd_keyword">CDATA</span><span class="dtd_plain"> </span><span class="dtd_keyword">#REQUIRED</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- The numeric type of this field --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ATTLIST</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">NumericRangeQuery</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">type</span><span class="dtd_plain"> (</span><span class="dtd_attribute_name">int</span><span class="dtd_plain"> | </span><span class="dtd_attribute_name">long</span><span class="dtd_plain"> | </span><span class="dtd_attribute_name">float</span><span class="dtd_plain"> | </span><span class="dtd_attribute_name">double</span><span class="dtd_plain">) </span><span class="dtd_attribute_value">&quot;int&quot;</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- Controls if the lowerTerm in the range is part of the allowed set of values --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ATTLIST</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">NumericRangeQuery</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">includeLower</span><span class="dtd_plain"> (</span><span class="dtd_attribute_name">true</span><span class="dtd_plain"> | </span><span class="dtd_attribute_name">false</span><span class="dtd_plain">) </span><span class="dtd_attribute_value">&quot;true&quot;</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- Controls if the upperTerm in the range is part of the allowed set of values --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ATTLIST</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">NumericRangeQuery</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">includeUpper</span><span class="dtd_plain"> (</span><span class="dtd_attribute_name">true</span><span class="dtd_plain"> | </span><span class="dtd_attribute_name">false</span><span class="dtd_plain">) </span><span class="dtd_attribute_value">&quot;true&quot;</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- Lower step values mean more precisions and so more terms in index (and index gets larger). This value must be an integer --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ATTLIST</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">NumericRangeQuery</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">precisionStep</span><span class="dtd_plain"> </span><span class="dtd_keyword">CDATA</span><span class="dtd_plain"> </span><span class="dtd_attribute_value">&quot;4&quot;</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!--</span>
<span class="dtd_comment"> A Filter that only accepts numeric values within a specified range</span>
<span class="dtd_comment"> </span><span class="dtd_dtddoc_tag">@example</span><span class="dtd_comment"> </span>
<span class="dtd_comment"> &lt;em&gt;Search for documents about people who are aged 20-25&lt;/em&gt;</span>
<span class="dtd_comment"> % </span>
<span class="dtd_comment"> &lt;FilteredQuery&gt;</span>
<span class="dtd_comment"> &lt;Query&gt;</span>
<span class="dtd_comment"> &lt;UserQuery&gt;person&lt;/UserQuery&gt;</span>
<span class="dtd_comment"> &lt;/Query&gt; </span>
<span class="dtd_comment"> &lt;Filter&gt;</span>
<span class="dtd_comment"> &lt;NumericRangeFilter fieldName=&quot;age&quot; lowerTerm=&quot;20&quot; upperTerm=&quot;25&quot;/&gt;</span>
<span class="dtd_comment"> &lt;/Filter&gt; </span>
<span class="dtd_comment"> &lt;/FilteredQuery&gt;</span>
<span class="dtd_comment"> %</span>
<span class="dtd_comment"> --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ELEMENT</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">NumericRangeFilter</span><span class="dtd_plain"> </span><span class="dtd_keyword">EMPTY</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- fieldName must be defined here or is taken from the most immediate parent XML element that defines a &quot;fieldName&quot; attribute --&gt;</span><span class="dtd_plain"> </span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ATTLIST</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">NumericRangeFilter</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">fieldName</span><span class="dtd_plain"> </span><span class="dtd_keyword">CDATA</span><span class="dtd_plain"> </span><span class="dtd_keyword">#IMPLIED</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- The lower-most term value for this field (must be &lt;= upperTerm and a valid native java numeric type) --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ATTLIST</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">NumericRangeFilter</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">lowerTerm</span><span class="dtd_plain"> </span><span class="dtd_keyword">CDATA</span><span class="dtd_plain"> </span><span class="dtd_keyword">#REQUIRED</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- The upper-most term value for this field (must be &gt;= lowerTerm and a valid native java numeric type) --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ATTLIST</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">NumericRangeFilter</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">upperTerm</span><span class="dtd_plain"> </span><span class="dtd_keyword">CDATA</span><span class="dtd_plain"> </span><span class="dtd_keyword">#REQUIRED</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- The numeric type of this field --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ATTLIST</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">NumericRangeFilter</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">type</span><span class="dtd_plain"> (</span><span class="dtd_attribute_name">int</span><span class="dtd_plain"> | </span><span class="dtd_attribute_name">long</span><span class="dtd_plain"> | </span><span class="dtd_attribute_name">float</span><span class="dtd_plain"> | </span><span class="dtd_attribute_name">double</span><span class="dtd_plain">) </span><span class="dtd_attribute_value">&quot;int&quot;</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- Controls if the lowerTerm in the range is part of the allowed set of values --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ATTLIST</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">NumericRangeFilter</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">includeLower</span><span class="dtd_plain"> (</span><span class="dtd_attribute_name">true</span><span class="dtd_plain"> | </span><span class="dtd_attribute_name">false</span><span class="dtd_plain">) </span><span class="dtd_attribute_value">&quot;true&quot;</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- Controls if the upperTerm in the range is part of the allowed set of values --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ATTLIST</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">NumericRangeFilter</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">includeUpper</span><span class="dtd_plain"> (</span><span class="dtd_attribute_name">true</span><span class="dtd_plain"> | </span><span class="dtd_attribute_name">false</span><span class="dtd_plain">) </span><span class="dtd_attribute_value">&quot;true&quot;</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- Lower step values mean more precisions and so more terms in index (and index gets larger). This value must be an integer --&gt;</span>
<span class="dtd_tag_symbols">&lt;!</span><span class="dtd_tag_name">ATTLIST</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">NumericRangeFilter</span><span class="dtd_plain"> </span><span class="dtd_attribute_name">precisionStep</span><span class="dtd_plain"> </span><span class="dtd_keyword">CDATA</span><span class="dtd_plain"> </span><span class="dtd_attribute_value">&quot;4&quot;</span><span class="dtd_tag_symbols">&gt;</span>
<span class="dtd_comment">&lt;!-- A single term used in a SpanQuery. These clauses are the building blocks for more complex &quot;span&quot; queries which test word proximity</span>
<span class="dtd_comment"> </span><span class="dtd_dtddoc_tag">@example</span><span class="dtd_comment"> &lt;em&gt;Find documents using terms close to each other about mining and accidents&lt;/em&gt;</span>

View File

@ -3,12 +3,13 @@
<meta http-equiv='CONTENT-TYPE' content='text/html' />
<link rel='StyleSheet' href='DTDDocStyle.css' type='text/css' media='screen' />
</head><body>
<p class='DTDSource'>Elements - Entities - Source | <a href='intro.html'>Intro</a> - <a href='elementsIndex.html'>Index</a><br /><a href='index.html' target='_top'>FRAMES</a>&nbsp;/&nbsp;<a href='elementsIndex.html' target='_top'>NO FRAMES</a></p><a href='#B'>B</a> <a href='#C'>C</a> <a href='#D'>D</a> <a href='#E'>E</a> <a href='#F'>F</a> <a href='#I'>I</a> <a href='#L'>L</a> <a href='#M'>M</a> <a href='#Q'>Q</a> <a href='#R'>R</a> <a href='#S'>S</a> <a href='#T'>T</a> <a href='#U'>U</a> <br />
<p class='DTDSource'>Elements - Entities - Source | <a href='intro.html'>Intro</a> - <a href='elementsIndex.html'>Index</a><br /><a href='index.html' target='_top'>FRAMES</a>&nbsp;/&nbsp;<a href='elementsIndex.html' target='_top'>NO FRAMES</a></p><a href='#B'>B</a> <a href='#C'>C</a> <a href='#D'>D</a> <a href='#E'>E</a> <a href='#F'>F</a> <a href='#I'>I</a> <a href='#L'>L</a> <a href='#M'>M</a> <a href='#N'>N</a> <a href='#Q'>Q</a> <a href='#R'>R</a> <a href='#S'>S</a> <a href='#T'>T</a> <a href='#U'>U</a> <br />
<a name='B'></a>
<h2>B</h2>
BooleanFilter - <a href='LuceneContribQuery.dtd.html#BooleanFilter'>Contrib Lucene</a><br />
BooleanQuery - <a href='LuceneContribQuery.dtd.html#BooleanQuery'>Contrib Lucene</a>, <a href='LuceneCoreQuery.dtd.html#BooleanQuery'>Core Lucene</a><br />
BoostingQuery - <a href='LuceneContribQuery.dtd.html#BoostingQuery'>Contrib Lucene</a><br />
BoostingTermQuery - <a href='LuceneContribQuery.dtd.html#BoostingTermQuery'>Contrib Lucene</a>, <a href='LuceneCoreQuery.dtd.html#BoostingTermQuery'>Core Lucene</a><br />
BoostQuery - <a href='LuceneContribQuery.dtd.html#BoostQuery'>Contrib Lucene</a><br />
<a name='C'></a>
<h2>C</h2>
@ -36,6 +37,10 @@ LikeThisQuery - <a href='LuceneContribQuery.dtd.html#LikeThisQuery'>Contrib Luce
<a name='M'></a>
<h2>M</h2>
MatchAllDocsQuery - <a href='LuceneContribQuery.dtd.html#MatchAllDocsQuery'>Contrib Lucene</a>, <a href='LuceneCoreQuery.dtd.html#MatchAllDocsQuery'>Core Lucene</a><br />
<a name='N'></a>
<h2>N</h2>
NumericRangeFilter - <a href='LuceneContribQuery.dtd.html#NumericRangeFilter'>Contrib Lucene</a>, <a href='LuceneCoreQuery.dtd.html#NumericRangeFilter'>Core Lucene</a><br />
NumericRangeQuery - <a href='LuceneContribQuery.dtd.html#NumericRangeQuery'>Contrib Lucene</a>, <a href='LuceneCoreQuery.dtd.html#NumericRangeQuery'>Core Lucene</a><br />
<a name='Q'></a>
<h2>Q</h2>
Query - <a href='LuceneContribQuery.dtd.html#Query'>Contrib Lucene</a>, <a href='LuceneCoreQuery.dtd.html#Query'>Core Lucene</a><br />

View File

@ -4,10 +4,10 @@
<link rel='StyleSheet' href='DTDDocStyle.css' type='text/css' media='screen' />
<link rel='StyleSheet' href='dtreeStyle.css' type='text/css' media='screen' />
<script type='text/javascript' src='cctree.js'></script>
<title>Lucene XML Query syntax, 08-Jul-2008</title>
<title>Lucene XML Query syntax, Mar 26, 2010</title>
</head><body>
<h1 class='TOCTitle'>Lucene XML Query syntax</h1>
<h2 class='TOCTitle'>08-Jul-2008</h2>
<h2 class='TOCTitle'>Mar 26, 2010</h2>
<a href='elementsIndex.html' target='detail'>Elements' index</a><hr />
<div class='dtree'>
<script type='text/javascript'>
@ -90,422 +90,529 @@ eltTree.addNode('35','<b>@lowerTerm</b>','LuceneContribQuery.dtd.html#RangeFilte
eltTree.linkNodes('31','35')
eltTree.addNode('36','<b>@upperTerm</b>','LuceneContribQuery.dtd.html#RangeFilter_upperTerm',false,false)
eltTree.linkNodes('31','36')
eltTree.addNode('37','<b>CachedFilter</b>','LuceneContribQuery.dtd.html#CachedFilter',false,false)
eltTree.addNode('37','<b>&lt;NumericRangeFilter/&gt;</b>','LuceneContribQuery.dtd.html#NumericRangeFilter',false,false)
eltTree.linkNodes('30','37')
eltTree.addNode('38','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.addNode('38','@fieldName','LuceneContribQuery.dtd.html#NumericRangeFilter_fieldName',false,false)
eltTree.linkNodes('37','38')
eltTree.linkNodes('38','6','<b>BooleanQuery</b>')
eltTree.linkNodes('38','12','<b>UserQuery</b>')
eltTree.linkNodes('38','15','<b>FilteredQuery</b>')
eltTree.linkNodes('38','19','<b>TermQuery</b>')
eltTree.linkNodes('38','22','<b>TermsQuery</b>')
eltTree.linkNodes('38','27','<b>MatchAllDocsQuery</b>')
eltTree.linkNodes('38','28','<b>ConstantScoreQuery</b>')
eltTree.addNode('39','<b>SpanOr</b>','LuceneContribQuery.dtd.html#SpanOr',false,false)
eltTree.linkNodes('38','39')
eltTree.addNode('40','<i>&lt;choice&gt;*</i>',null,true,false)
eltTree.linkNodes('39','40')
eltTree.linkNodes('40','39','<b>SpanOr</b>')
eltTree.addNode('41','<b>SpanNear</b>','LuceneContribQuery.dtd.html#SpanNear',false,false)
eltTree.linkNodes('40','41')
eltTree.addNode('42','@inOrder','LuceneContribQuery.dtd.html#SpanNear_inOrder',false,false)
eltTree.linkNodes('41','42')
eltTree.addNode('43','<b>@slop</b>','LuceneContribQuery.dtd.html#SpanNear_slop',false,false)
eltTree.linkNodes('41','43')
eltTree.addNode('44','<i>&lt;choice&gt;*</i>',null,true,false)
eltTree.linkNodes('41','44')
eltTree.linkNodes('44','39','<b>SpanOr</b>')
eltTree.linkNodes('44','41','<b>SpanNear</b>')
eltTree.addNode('45','<b>SpanOrTerms</b>','LuceneContribQuery.dtd.html#SpanOrTerms',false,false)
eltTree.linkNodes('44','45')
eltTree.addNode('46','<b>@fieldName</b>','LuceneContribQuery.dtd.html#SpanOrTerms_fieldName',false,false)
eltTree.addNode('39','@includeLower','LuceneContribQuery.dtd.html#NumericRangeFilter_includeLower',false,false)
eltTree.linkNodes('37','39')
eltTree.addNode('40','@includeUpper','LuceneContribQuery.dtd.html#NumericRangeFilter_includeUpper',false,false)
eltTree.linkNodes('37','40')
eltTree.addNode('41','<b>@lowerTerm</b>','LuceneContribQuery.dtd.html#NumericRangeFilter_lowerTerm',false,false)
eltTree.linkNodes('37','41')
eltTree.addNode('42','@precisionStep','LuceneContribQuery.dtd.html#NumericRangeFilter_precisionStep',false,false)
eltTree.linkNodes('37','42')
eltTree.addNode('43','@type','LuceneContribQuery.dtd.html#NumericRangeFilter_type',false,false)
eltTree.linkNodes('37','43')
eltTree.addNode('44','<b>@upperTerm</b>','LuceneContribQuery.dtd.html#NumericRangeFilter_upperTerm',false,false)
eltTree.linkNodes('37','44')
eltTree.addNode('45','<b>CachedFilter</b>','LuceneContribQuery.dtd.html#CachedFilter',false,false)
eltTree.linkNodes('30','45')
eltTree.addNode('46','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('45','46')
eltTree.addNode('47','<b>SpanFirst</b>','LuceneContribQuery.dtd.html#SpanFirst',false,false)
eltTree.linkNodes('44','47')
eltTree.addNode('48','@boost','LuceneContribQuery.dtd.html#SpanFirst_boost',false,false)
eltTree.linkNodes('47','48')
eltTree.addNode('49','<b>@end</b>','LuceneContribQuery.dtd.html#SpanFirst_end',false,false)
eltTree.linkNodes('47','49')
eltTree.addNode('50','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('47','50')
eltTree.linkNodes('50','39','<b>SpanOr</b>')
eltTree.linkNodes('50','41','<b>SpanNear</b>')
eltTree.linkNodes('50','45','<b>SpanOrTerms</b>')
eltTree.linkNodes('50','47','<b>SpanFirst</b>')
eltTree.addNode('51','<b>SpanNot</b>','LuceneContribQuery.dtd.html#SpanNot',false,false)
eltTree.linkNodes('50','51')
eltTree.addNode('52','<b>Include</b>','LuceneContribQuery.dtd.html#Include',false,false)
eltTree.linkNodes('51','52')
eltTree.addNode('53','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('52','53')
eltTree.linkNodes('53','39','<b>SpanOr</b>')
eltTree.linkNodes('53','41','<b>SpanNear</b>')
eltTree.linkNodes('53','45','<b>SpanOrTerms</b>')
eltTree.linkNodes('53','47','<b>SpanFirst</b>')
eltTree.linkNodes('53','51','<b>SpanNot</b>')
eltTree.addNode('54','<b>SpanTerm</b>','LuceneContribQuery.dtd.html#SpanTerm',false,false)
eltTree.linkNodes('53','54')
eltTree.addNode('55','<b>@fieldName</b>','LuceneContribQuery.dtd.html#SpanTerm_fieldName',false,false)
eltTree.linkNodes('54','55')
eltTree.addNode('56','<b>Exclude</b>','LuceneContribQuery.dtd.html#Exclude',false,false)
eltTree.linkNodes('51','56')
eltTree.addNode('57','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('46','6','<b>BooleanQuery</b>')
eltTree.linkNodes('46','12','<b>UserQuery</b>')
eltTree.linkNodes('46','15','<b>FilteredQuery</b>')
eltTree.linkNodes('46','19','<b>TermQuery</b>')
eltTree.linkNodes('46','22','<b>TermsQuery</b>')
eltTree.linkNodes('46','27','<b>MatchAllDocsQuery</b>')
eltTree.linkNodes('46','28','<b>ConstantScoreQuery</b>')
eltTree.addNode('47','<b>BoostingTermQuery</b>','LuceneContribQuery.dtd.html#BoostingTermQuery',false,false)
eltTree.linkNodes('46','47')
eltTree.addNode('48','<b>&lt;NumericRangeQuery/&gt;</b>','LuceneContribQuery.dtd.html#NumericRangeQuery',false,false)
eltTree.linkNodes('46','48')
eltTree.addNode('49','@fieldName','LuceneContribQuery.dtd.html#NumericRangeQuery_fieldName',false,false)
eltTree.linkNodes('48','49')
eltTree.addNode('50','@includeLower','LuceneContribQuery.dtd.html#NumericRangeQuery_includeLower',false,false)
eltTree.linkNodes('48','50')
eltTree.addNode('51','@includeUpper','LuceneContribQuery.dtd.html#NumericRangeQuery_includeUpper',false,false)
eltTree.linkNodes('48','51')
eltTree.addNode('52','<b>@lowerTerm</b>','LuceneContribQuery.dtd.html#NumericRangeQuery_lowerTerm',false,false)
eltTree.linkNodes('48','52')
eltTree.addNode('53','@precisionStep','LuceneContribQuery.dtd.html#NumericRangeQuery_precisionStep',false,false)
eltTree.linkNodes('48','53')
eltTree.addNode('54','@type','LuceneContribQuery.dtd.html#NumericRangeQuery_type',false,false)
eltTree.linkNodes('48','54')
eltTree.addNode('55','<b>@upperTerm</b>','LuceneContribQuery.dtd.html#NumericRangeQuery_upperTerm',false,false)
eltTree.linkNodes('48','55')
eltTree.addNode('56','<b>SpanOr</b>','LuceneContribQuery.dtd.html#SpanOr',false,false)
eltTree.linkNodes('46','56')
eltTree.addNode('57','<i>&lt;choice&gt;*</i>',null,true,false)
eltTree.linkNodes('56','57')
eltTree.linkNodes('57','39','<b>SpanOr</b>')
eltTree.linkNodes('57','41','<b>SpanNear</b>')
eltTree.linkNodes('57','45','<b>SpanOrTerms</b>')
eltTree.linkNodes('57','47','<b>SpanFirst</b>')
eltTree.linkNodes('57','51','<b>SpanNot</b>')
eltTree.linkNodes('57','54','<b>SpanTerm</b>')
eltTree.linkNodes('50','54','<b>SpanTerm</b>')
eltTree.linkNodes('44','51','<b>SpanNot</b>')
eltTree.linkNodes('44','54','<b>SpanTerm</b>')
eltTree.linkNodes('40','45','<b>SpanOrTerms</b>')
eltTree.linkNodes('40','47','<b>SpanFirst</b>')
eltTree.linkNodes('40','51','<b>SpanNot</b>')
eltTree.linkNodes('40','54','<b>SpanTerm</b>')
eltTree.linkNodes('38','41','<b>SpanNear</b>')
eltTree.linkNodes('38','45','<b>SpanOrTerms</b>')
eltTree.linkNodes('38','47','<b>SpanFirst</b>')
eltTree.linkNodes('38','51','<b>SpanNot</b>')
eltTree.linkNodes('38','54','<b>SpanTerm</b>')
eltTree.addNode('58','<b>LikeThisQuery</b>','LuceneContribQuery.dtd.html#LikeThisQuery',false,false)
eltTree.linkNodes('38','58')
eltTree.addNode('59','@boost','LuceneContribQuery.dtd.html#LikeThisQuery_boost',false,false)
eltTree.linkNodes('57','56','<b>SpanOr</b>')
eltTree.addNode('58','<b>SpanNear</b>','LuceneContribQuery.dtd.html#SpanNear',false,false)
eltTree.linkNodes('57','58')
eltTree.addNode('59','@inOrder','LuceneContribQuery.dtd.html#SpanNear_inOrder',false,false)
eltTree.linkNodes('58','59')
eltTree.addNode('60','@fieldNames','LuceneContribQuery.dtd.html#LikeThisQuery_fieldNames',false,false)
eltTree.addNode('60','<b>@slop</b>','LuceneContribQuery.dtd.html#SpanNear_slop',false,false)
eltTree.linkNodes('58','60')
eltTree.addNode('61','@maxQueryTerms','LuceneContribQuery.dtd.html#LikeThisQuery_maxQueryTerms',false,false)
eltTree.addNode('61','<i>&lt;choice&gt;*</i>',null,true,false)
eltTree.linkNodes('58','61')
eltTree.addNode('62','@minTermFrequency','LuceneContribQuery.dtd.html#LikeThisQuery_minTermFrequency',false,false)
eltTree.linkNodes('58','62')
eltTree.addNode('63','@percentTermsToMatch','LuceneContribQuery.dtd.html#LikeThisQuery_percentTermsToMatch',false,false)
eltTree.linkNodes('58','63')
eltTree.addNode('64','@stopWords','LuceneContribQuery.dtd.html#LikeThisQuery_stopWords',false,false)
eltTree.linkNodes('58','64')
eltTree.addNode('65','<b>BoostingQuery</b>','LuceneContribQuery.dtd.html#BoostingQuery',false,false)
eltTree.linkNodes('38','65')
eltTree.addNode('66','@boost','LuceneContribQuery.dtd.html#BoostingQuery_boost',false,false)
eltTree.linkNodes('65','66')
eltTree.linkNodes('65','17','<b>Query</b>')
eltTree.addNode('67','<b>BoostQuery</b>','LuceneContribQuery.dtd.html#BoostQuery',false,false)
eltTree.linkNodes('65','67')
eltTree.addNode('68','@boost','LuceneContribQuery.dtd.html#BoostQuery_boost',false,false)
eltTree.linkNodes('61','56','<b>SpanOr</b>')
eltTree.linkNodes('61','58','<b>SpanNear</b>')
eltTree.addNode('62','<b>SpanOrTerms</b>','LuceneContribQuery.dtd.html#SpanOrTerms',false,false)
eltTree.linkNodes('61','62')
eltTree.addNode('63','<b>@fieldName</b>','LuceneContribQuery.dtd.html#SpanOrTerms_fieldName',false,false)
eltTree.linkNodes('62','63')
eltTree.addNode('64','<b>SpanFirst</b>','LuceneContribQuery.dtd.html#SpanFirst',false,false)
eltTree.linkNodes('61','64')
eltTree.addNode('65','@boost','LuceneContribQuery.dtd.html#SpanFirst_boost',false,false)
eltTree.linkNodes('64','65')
eltTree.addNode('66','<b>@end</b>','LuceneContribQuery.dtd.html#SpanFirst_end',false,false)
eltTree.linkNodes('64','66')
eltTree.addNode('67','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('64','67')
eltTree.linkNodes('67','56','<b>SpanOr</b>')
eltTree.linkNodes('67','58','<b>SpanNear</b>')
eltTree.linkNodes('67','62','<b>SpanOrTerms</b>')
eltTree.linkNodes('67','64','<b>SpanFirst</b>')
eltTree.addNode('68','<b>SpanNot</b>','LuceneContribQuery.dtd.html#SpanNot',false,false)
eltTree.linkNodes('67','68')
eltTree.addNode('69','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('67','69')
eltTree.linkNodes('69','6','<b>BooleanQuery</b>')
eltTree.linkNodes('69','12','<b>UserQuery</b>')
eltTree.linkNodes('69','15','<b>FilteredQuery</b>')
eltTree.linkNodes('69','19','<b>TermQuery</b>')
eltTree.linkNodes('69','22','<b>TermsQuery</b>')
eltTree.linkNodes('69','27','<b>MatchAllDocsQuery</b>')
eltTree.linkNodes('69','28','<b>ConstantScoreQuery</b>')
eltTree.linkNodes('69','39','<b>SpanOr</b>')
eltTree.linkNodes('69','41','<b>SpanNear</b>')
eltTree.linkNodes('69','45','<b>SpanOrTerms</b>')
eltTree.linkNodes('69','47','<b>SpanFirst</b>')
eltTree.linkNodes('69','51','<b>SpanNot</b>')
eltTree.linkNodes('69','54','<b>SpanTerm</b>')
eltTree.linkNodes('69','58','<b>LikeThisQuery</b>')
eltTree.linkNodes('69','65','<b>BoostingQuery</b>')
eltTree.addNode('70','<b>FuzzyLikeThisQuery</b>','LuceneContribQuery.dtd.html#FuzzyLikeThisQuery',false,false)
eltTree.addNode('69','<b>Include</b>','LuceneContribQuery.dtd.html#Include',false,false)
eltTree.linkNodes('68','69')
eltTree.addNode('70','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('69','70')
eltTree.addNode('71','@boost','LuceneContribQuery.dtd.html#FuzzyLikeThisQuery_boost',false,false)
eltTree.linkNodes('70','56','<b>SpanOr</b>')
eltTree.linkNodes('70','58','<b>SpanNear</b>')
eltTree.linkNodes('70','62','<b>SpanOrTerms</b>')
eltTree.linkNodes('70','64','<b>SpanFirst</b>')
eltTree.linkNodes('70','68','<b>SpanNot</b>')
eltTree.addNode('71','<b>SpanTerm</b>','LuceneContribQuery.dtd.html#SpanTerm',false,false)
eltTree.linkNodes('70','71')
eltTree.addNode('72','@ignoreTF','LuceneContribQuery.dtd.html#FuzzyLikeThisQuery_ignoreTF',false,false)
eltTree.linkNodes('70','72')
eltTree.addNode('73','@maxNumTerms','LuceneContribQuery.dtd.html#FuzzyLikeThisQuery_maxNumTerms',false,false)
eltTree.linkNodes('70','73')
eltTree.addNode('74','<i>&lt;sequence&gt;*</i>',null,true,false)
eltTree.linkNodes('70','74')
eltTree.addNode('75','<b>Field</b>','LuceneContribQuery.dtd.html#Field',false,false)
eltTree.linkNodes('74','75')
eltTree.addNode('76','@fieldName','LuceneContribQuery.dtd.html#Field_fieldName',false,false)
eltTree.addNode('72','<b>@fieldName</b>','LuceneContribQuery.dtd.html#SpanTerm_fieldName',false,false)
eltTree.linkNodes('71','72')
eltTree.linkNodes('70','47','<b>BoostingTermQuery</b>')
eltTree.addNode('73','<b>Exclude</b>','LuceneContribQuery.dtd.html#Exclude',false,false)
eltTree.linkNodes('68','73')
eltTree.addNode('74','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('73','74')
eltTree.linkNodes('74','56','<b>SpanOr</b>')
eltTree.linkNodes('74','58','<b>SpanNear</b>')
eltTree.linkNodes('74','62','<b>SpanOrTerms</b>')
eltTree.linkNodes('74','64','<b>SpanFirst</b>')
eltTree.linkNodes('74','68','<b>SpanNot</b>')
eltTree.linkNodes('74','71','<b>SpanTerm</b>')
eltTree.linkNodes('74','47','<b>BoostingTermQuery</b>')
eltTree.linkNodes('67','71','<b>SpanTerm</b>')
eltTree.linkNodes('67','47','<b>BoostingTermQuery</b>')
eltTree.linkNodes('61','68','<b>SpanNot</b>')
eltTree.linkNodes('61','71','<b>SpanTerm</b>')
eltTree.linkNodes('61','47','<b>BoostingTermQuery</b>')
eltTree.linkNodes('57','62','<b>SpanOrTerms</b>')
eltTree.linkNodes('57','64','<b>SpanFirst</b>')
eltTree.linkNodes('57','68','<b>SpanNot</b>')
eltTree.linkNodes('57','71','<b>SpanTerm</b>')
eltTree.linkNodes('57','47','<b>BoostingTermQuery</b>')
eltTree.linkNodes('46','58','<b>SpanNear</b>')
eltTree.linkNodes('46','62','<b>SpanOrTerms</b>')
eltTree.linkNodes('46','64','<b>SpanFirst</b>')
eltTree.linkNodes('46','68','<b>SpanNot</b>')
eltTree.linkNodes('46','71','<b>SpanTerm</b>')
eltTree.linkNodes('46','47','<b>BoostingTermQuery</b>')
eltTree.addNode('75','<b>LikeThisQuery</b>','LuceneContribQuery.dtd.html#LikeThisQuery',false,false)
eltTree.linkNodes('46','75')
eltTree.addNode('76','@boost','LuceneContribQuery.dtd.html#LikeThisQuery_boost',false,false)
eltTree.linkNodes('75','76')
eltTree.addNode('77','@minSimilarity','LuceneContribQuery.dtd.html#Field_minSimilarity',false,false)
eltTree.addNode('77','@fieldNames','LuceneContribQuery.dtd.html#LikeThisQuery_fieldNames',false,false)
eltTree.linkNodes('75','77')
eltTree.addNode('78','@prefixLength','LuceneContribQuery.dtd.html#Field_prefixLength',false,false)
eltTree.addNode('78','@maxQueryTerms','LuceneContribQuery.dtd.html#LikeThisQuery_maxQueryTerms',false,false)
eltTree.linkNodes('75','78')
eltTree.linkNodes('38','70','<b>FuzzyLikeThisQuery</b>')
eltTree.linkNodes('38','31','<b>RangeFilter</b>')
eltTree.linkNodes('38','37','<b>CachedFilter</b>')
eltTree.addNode('79','<b>TermsFilter</b>','LuceneContribQuery.dtd.html#TermsFilter',false,false)
eltTree.linkNodes('38','79')
eltTree.addNode('80','@fieldName','LuceneContribQuery.dtd.html#TermsFilter_fieldName',false,false)
eltTree.linkNodes('79','80')
eltTree.linkNodes('38','1','<b>BooleanFilter</b>')
eltTree.addNode('81','<b>&lt;DuplicateFilter/&gt;</b>','LuceneContribQuery.dtd.html#DuplicateFilter',false,false)
eltTree.linkNodes('38','81')
eltTree.addNode('82','@fieldName','LuceneContribQuery.dtd.html#DuplicateFilter_fieldName',false,false)
eltTree.linkNodes('81','82')
eltTree.addNode('83','@keepMode','LuceneContribQuery.dtd.html#DuplicateFilter_keepMode',false,false)
eltTree.linkNodes('81','83')
eltTree.addNode('84','@processingMode','LuceneContribQuery.dtd.html#DuplicateFilter_processingMode',false,false)
eltTree.linkNodes('81','84')
eltTree.linkNodes('30','79','<b>TermsFilter</b>')
eltTree.linkNodes('30','1','<b>BooleanFilter</b>')
eltTree.linkNodes('30','81','<b>DuplicateFilter</b>')
eltTree.linkNodes('18','39','<b>SpanOr</b>')
eltTree.linkNodes('18','41','<b>SpanNear</b>')
eltTree.linkNodes('18','45','<b>SpanOrTerms</b>')
eltTree.linkNodes('18','47','<b>SpanFirst</b>')
eltTree.linkNodes('18','51','<b>SpanNot</b>')
eltTree.linkNodes('18','54','<b>SpanTerm</b>')
eltTree.linkNodes('18','58','<b>LikeThisQuery</b>')
eltTree.linkNodes('18','65','<b>BoostingQuery</b>')
eltTree.linkNodes('18','70','<b>FuzzyLikeThisQuery</b>')
eltTree.addNode('85','<b>Filter</b>','LuceneContribQuery.dtd.html#Filter',false,false)
eltTree.linkNodes('15','85')
eltTree.addNode('79','@minTermFrequency','LuceneContribQuery.dtd.html#LikeThisQuery_minTermFrequency',false,false)
eltTree.linkNodes('75','79')
eltTree.addNode('80','@percentTermsToMatch','LuceneContribQuery.dtd.html#LikeThisQuery_percentTermsToMatch',false,false)
eltTree.linkNodes('75','80')
eltTree.addNode('81','@stopWords','LuceneContribQuery.dtd.html#LikeThisQuery_stopWords',false,false)
eltTree.linkNodes('75','81')
eltTree.addNode('82','<b>BoostingQuery</b>','LuceneContribQuery.dtd.html#BoostingQuery',false,false)
eltTree.linkNodes('46','82')
eltTree.addNode('83','@boost','LuceneContribQuery.dtd.html#BoostingQuery_boost',false,false)
eltTree.linkNodes('82','83')
eltTree.linkNodes('82','17','<b>Query</b>')
eltTree.addNode('84','<b>BoostQuery</b>','LuceneContribQuery.dtd.html#BoostQuery',false,false)
eltTree.linkNodes('82','84')
eltTree.addNode('85','@boost','LuceneContribQuery.dtd.html#BoostQuery_boost',false,false)
eltTree.linkNodes('84','85')
eltTree.addNode('86','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('85','86')
eltTree.linkNodes('86','31','<b>RangeFilter</b>')
eltTree.linkNodes('86','37','<b>CachedFilter</b>')
eltTree.linkNodes('86','79','<b>TermsFilter</b>')
eltTree.linkNodes('86','1','<b>BooleanFilter</b>')
eltTree.linkNodes('86','81','<b>DuplicateFilter</b>')
eltTree.linkNodes('84','86')
eltTree.linkNodes('86','6','<b>BooleanQuery</b>')
eltTree.linkNodes('86','12','<b>UserQuery</b>')
eltTree.linkNodes('86','15','<b>FilteredQuery</b>')
eltTree.linkNodes('86','19','<b>TermQuery</b>')
eltTree.linkNodes('86','22','<b>TermsQuery</b>')
eltTree.linkNodes('86','27','<b>MatchAllDocsQuery</b>')
eltTree.linkNodes('86','28','<b>ConstantScoreQuery</b>')
eltTree.linkNodes('86','47','<b>BoostingTermQuery</b>')
eltTree.linkNodes('86','48','<b>NumericRangeQuery</b>')
eltTree.linkNodes('86','56','<b>SpanOr</b>')
eltTree.linkNodes('86','58','<b>SpanNear</b>')
eltTree.linkNodes('86','62','<b>SpanOrTerms</b>')
eltTree.linkNodes('86','64','<b>SpanFirst</b>')
eltTree.linkNodes('86','68','<b>SpanNot</b>')
eltTree.linkNodes('86','71','<b>SpanTerm</b>')
eltTree.linkNodes('86','47','<b>BoostingTermQuery</b>')
eltTree.linkNodes('86','75','<b>LikeThisQuery</b>')
eltTree.linkNodes('86','82','<b>BoostingQuery</b>')
eltTree.addNode('87','<b>FuzzyLikeThisQuery</b>','LuceneContribQuery.dtd.html#FuzzyLikeThisQuery',false,false)
eltTree.linkNodes('86','87')
eltTree.addNode('88','@boost','LuceneContribQuery.dtd.html#FuzzyLikeThisQuery_boost',false,false)
eltTree.linkNodes('87','88')
eltTree.addNode('89','@ignoreTF','LuceneContribQuery.dtd.html#FuzzyLikeThisQuery_ignoreTF',false,false)
eltTree.linkNodes('87','89')
eltTree.addNode('90','@maxNumTerms','LuceneContribQuery.dtd.html#FuzzyLikeThisQuery_maxNumTerms',false,false)
eltTree.linkNodes('87','90')
eltTree.addNode('91','<i>&lt;sequence&gt;*</i>',null,true,false)
eltTree.linkNodes('87','91')
eltTree.addNode('92','<b>Field</b>','LuceneContribQuery.dtd.html#Field',false,false)
eltTree.linkNodes('91','92')
eltTree.addNode('93','@fieldName','LuceneContribQuery.dtd.html#Field_fieldName',false,false)
eltTree.linkNodes('92','93')
eltTree.addNode('94','@minSimilarity','LuceneContribQuery.dtd.html#Field_minSimilarity',false,false)
eltTree.linkNodes('92','94')
eltTree.addNode('95','@prefixLength','LuceneContribQuery.dtd.html#Field_prefixLength',false,false)
eltTree.linkNodes('92','95')
eltTree.linkNodes('46','87','<b>FuzzyLikeThisQuery</b>')
eltTree.linkNodes('46','31','<b>RangeFilter</b>')
eltTree.linkNodes('46','37','<b>NumericRangeFilter</b>')
eltTree.linkNodes('46','45','<b>CachedFilter</b>')
eltTree.addNode('96','<b>TermsFilter</b>','LuceneContribQuery.dtd.html#TermsFilter',false,false)
eltTree.linkNodes('46','96')
eltTree.addNode('97','@fieldName','LuceneContribQuery.dtd.html#TermsFilter_fieldName',false,false)
eltTree.linkNodes('96','97')
eltTree.linkNodes('46','1','<b>BooleanFilter</b>')
eltTree.addNode('98','<b>&lt;DuplicateFilter/&gt;</b>','LuceneContribQuery.dtd.html#DuplicateFilter',false,false)
eltTree.linkNodes('46','98')
eltTree.addNode('99','@fieldName','LuceneContribQuery.dtd.html#DuplicateFilter_fieldName',false,false)
eltTree.linkNodes('98','99')
eltTree.addNode('100','@keepMode','LuceneContribQuery.dtd.html#DuplicateFilter_keepMode',false,false)
eltTree.linkNodes('98','100')
eltTree.addNode('101','@processingMode','LuceneContribQuery.dtd.html#DuplicateFilter_processingMode',false,false)
eltTree.linkNodes('98','101')
eltTree.linkNodes('30','96','<b>TermsFilter</b>')
eltTree.linkNodes('30','1','<b>BooleanFilter</b>')
eltTree.linkNodes('30','98','<b>DuplicateFilter</b>')
eltTree.linkNodes('18','47','<b>BoostingTermQuery</b>')
eltTree.linkNodes('18','48','<b>NumericRangeQuery</b>')
eltTree.linkNodes('18','56','<b>SpanOr</b>')
eltTree.linkNodes('18','58','<b>SpanNear</b>')
eltTree.linkNodes('18','62','<b>SpanOrTerms</b>')
eltTree.linkNodes('18','64','<b>SpanFirst</b>')
eltTree.linkNodes('18','68','<b>SpanNot</b>')
eltTree.linkNodes('18','71','<b>SpanTerm</b>')
eltTree.linkNodes('18','47','<b>BoostingTermQuery</b>')
eltTree.linkNodes('18','75','<b>LikeThisQuery</b>')
eltTree.linkNodes('18','82','<b>BoostingQuery</b>')
eltTree.linkNodes('18','87','<b>FuzzyLikeThisQuery</b>')
eltTree.addNode('102','<b>Filter</b>','LuceneContribQuery.dtd.html#Filter',false,false)
eltTree.linkNodes('15','102')
eltTree.addNode('103','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('102','103')
eltTree.linkNodes('103','31','<b>RangeFilter</b>')
eltTree.linkNodes('103','37','<b>NumericRangeFilter</b>')
eltTree.linkNodes('103','45','<b>CachedFilter</b>')
eltTree.linkNodes('103','96','<b>TermsFilter</b>')
eltTree.linkNodes('103','1','<b>BooleanFilter</b>')
eltTree.linkNodes('103','98','<b>DuplicateFilter</b>')
eltTree.linkNodes('5','19','<b>TermQuery</b>')
eltTree.linkNodes('5','22','<b>TermsQuery</b>')
eltTree.linkNodes('5','27','<b>MatchAllDocsQuery</b>')
eltTree.linkNodes('5','28','<b>ConstantScoreQuery</b>')
eltTree.linkNodes('5','39','<b>SpanOr</b>')
eltTree.linkNodes('5','41','<b>SpanNear</b>')
eltTree.linkNodes('5','45','<b>SpanOrTerms</b>')
eltTree.linkNodes('5','47','<b>SpanFirst</b>')
eltTree.linkNodes('5','51','<b>SpanNot</b>')
eltTree.linkNodes('5','54','<b>SpanTerm</b>')
eltTree.linkNodes('5','58','<b>LikeThisQuery</b>')
eltTree.linkNodes('5','65','<b>BoostingQuery</b>')
eltTree.linkNodes('5','70','<b>FuzzyLikeThisQuery</b>')
eltTree.linkNodes('5','47','<b>BoostingTermQuery</b>')
eltTree.linkNodes('5','48','<b>NumericRangeQuery</b>')
eltTree.linkNodes('5','56','<b>SpanOr</b>')
eltTree.linkNodes('5','58','<b>SpanNear</b>')
eltTree.linkNodes('5','62','<b>SpanOrTerms</b>')
eltTree.linkNodes('5','64','<b>SpanFirst</b>')
eltTree.linkNodes('5','68','<b>SpanNot</b>')
eltTree.linkNodes('5','71','<b>SpanTerm</b>')
eltTree.linkNodes('5','47','<b>BoostingTermQuery</b>')
eltTree.linkNodes('5','75','<b>LikeThisQuery</b>')
eltTree.linkNodes('5','82','<b>BoostingQuery</b>')
eltTree.linkNodes('5','87','<b>FuzzyLikeThisQuery</b>')
eltTree.linkNodes('5','31','<b>RangeFilter</b>')
eltTree.linkNodes('5','37','<b>CachedFilter</b>')
eltTree.linkNodes('5','79','<b>TermsFilter</b>')
eltTree.linkNodes('5','37','<b>NumericRangeFilter</b>')
eltTree.linkNodes('5','45','<b>CachedFilter</b>')
eltTree.linkNodes('5','96','<b>TermsFilter</b>')
eltTree.linkNodes('5','1','<b>BooleanFilter</b>')
eltTree.linkNodes('5','81','<b>DuplicateFilter</b>')
eltTree.linkNodes('5','98','<b>DuplicateFilter</b>')
eltTree.linkNodes('0','6','BooleanQuery')
eltTree.linkNodes('0','65','BoostingQuery')
eltTree.linkNodes('0','67','BoostQuery')
eltTree.linkNodes('0','37','CachedFilter')
eltTree.linkNodes('0','82','BoostingQuery')
eltTree.linkNodes('0','47','BoostingTermQuery')
eltTree.linkNodes('0','84','BoostQuery')
eltTree.linkNodes('0','45','CachedFilter')
eltTree.linkNodes('0','3','Clause')
eltTree.linkNodes('0','28','ConstantScoreQuery')
eltTree.linkNodes('0','81','DuplicateFilter')
eltTree.linkNodes('0','56','Exclude')
eltTree.linkNodes('0','75','Field')
eltTree.linkNodes('0','85','Filter')
eltTree.linkNodes('0','98','DuplicateFilter')
eltTree.linkNodes('0','73','Exclude')
eltTree.linkNodes('0','92','Field')
eltTree.linkNodes('0','102','Filter')
eltTree.linkNodes('0','15','FilteredQuery')
eltTree.linkNodes('0','70','FuzzyLikeThisQuery')
eltTree.linkNodes('0','52','Include')
eltTree.linkNodes('0','58','LikeThisQuery')
eltTree.linkNodes('0','87','FuzzyLikeThisQuery')
eltTree.linkNodes('0','69','Include')
eltTree.linkNodes('0','75','LikeThisQuery')
eltTree.linkNodes('0','27','MatchAllDocsQuery')
eltTree.linkNodes('0','37','NumericRangeFilter')
eltTree.linkNodes('0','48','NumericRangeQuery')
eltTree.linkNodes('0','17','Query')
eltTree.linkNodes('0','31','RangeFilter')
eltTree.linkNodes('0','47','SpanFirst')
eltTree.linkNodes('0','41','SpanNear')
eltTree.linkNodes('0','51','SpanNot')
eltTree.linkNodes('0','39','SpanOr')
eltTree.linkNodes('0','45','SpanOrTerms')
eltTree.linkNodes('0','54','SpanTerm')
eltTree.linkNodes('0','64','SpanFirst')
eltTree.linkNodes('0','58','SpanNear')
eltTree.linkNodes('0','68','SpanNot')
eltTree.linkNodes('0','56','SpanOr')
eltTree.linkNodes('0','62','SpanOrTerms')
eltTree.linkNodes('0','71','SpanTerm')
eltTree.linkNodes('0','19','TermQuery')
eltTree.linkNodes('0','79','TermsFilter')
eltTree.linkNodes('0','96','TermsFilter')
eltTree.linkNodes('0','22','TermsQuery')
eltTree.linkNodes('0','12','UserQuery')
eltTree.addRootNode('87','Core Lucene','LuceneCoreQuery.dtd.html',false,false)
eltTree.addNode('88','BooleanQuery','LuceneCoreQuery.dtd.html#BooleanQuery',false,false)
eltTree.linkNodes('87','88')
eltTree.addNode('89','@boost','LuceneCoreQuery.dtd.html#BooleanQuery_boost',false,false)
eltTree.linkNodes('88','89')
eltTree.addNode('90','@disableCoord','LuceneCoreQuery.dtd.html#BooleanQuery_disableCoord',false,false)
eltTree.linkNodes('88','90')
eltTree.addNode('91','@fieldName','LuceneCoreQuery.dtd.html#BooleanQuery_fieldName',false,false)
eltTree.linkNodes('88','91')
eltTree.addNode('92','@minimumNumberShouldMatch','LuceneCoreQuery.dtd.html#BooleanQuery_minimumNumberShouldMatch',false,false)
eltTree.linkNodes('88','92')
eltTree.addNode('93','<b><i>&lt;sequence&gt;+</i></b>',null,true,false)
eltTree.linkNodes('88','93')
eltTree.addNode('94','<b>Clause</b>','LuceneCoreQuery.dtd.html#Clause',false,false)
eltTree.linkNodes('93','94')
eltTree.addNode('95','@occurs','LuceneCoreQuery.dtd.html#Clause_occurs',false,false)
eltTree.linkNodes('94','95')
eltTree.addNode('96','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('94','96')
eltTree.linkNodes('96','88','<b>BooleanQuery</b>')
eltTree.addNode('97','<b>UserQuery</b>','LuceneCoreQuery.dtd.html#UserQuery',false,false)
eltTree.linkNodes('96','97')
eltTree.addNode('98','@boost','LuceneCoreQuery.dtd.html#UserQuery_boost',false,false)
eltTree.linkNodes('97','98')
eltTree.addNode('99','@fieldName','LuceneCoreQuery.dtd.html#UserQuery_fieldName',false,false)
eltTree.linkNodes('97','99')
eltTree.addNode('100','<b>FilteredQuery</b>','LuceneCoreQuery.dtd.html#FilteredQuery',false,false)
eltTree.linkNodes('96','100')
eltTree.addNode('101','@boost','LuceneCoreQuery.dtd.html#FilteredQuery_boost',false,false)
eltTree.linkNodes('100','101')
eltTree.addNode('102','<b>Query</b>','LuceneCoreQuery.dtd.html#Query',false,false)
eltTree.linkNodes('100','102')
eltTree.addNode('103','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('102','103')
eltTree.linkNodes('103','88','<b>BooleanQuery</b>')
eltTree.linkNodes('103','97','<b>UserQuery</b>')
eltTree.linkNodes('103','100','<b>FilteredQuery</b>')
eltTree.addNode('104','<b>TermQuery</b>','LuceneCoreQuery.dtd.html#TermQuery',false,false)
eltTree.linkNodes('103','104')
eltTree.addNode('105','@boost','LuceneCoreQuery.dtd.html#TermQuery_boost',false,false)
eltTree.addRootNode('104','Core Lucene','LuceneCoreQuery.dtd.html',false,false)
eltTree.addNode('105','BooleanQuery','LuceneCoreQuery.dtd.html#BooleanQuery',false,false)
eltTree.linkNodes('104','105')
eltTree.addNode('106','@fieldName','LuceneCoreQuery.dtd.html#TermQuery_fieldName',false,false)
eltTree.linkNodes('104','106')
eltTree.addNode('107','<b>TermsQuery</b>','LuceneCoreQuery.dtd.html#TermsQuery',false,false)
eltTree.linkNodes('103','107')
eltTree.addNode('108','@boost','LuceneCoreQuery.dtd.html#TermsQuery_boost',false,false)
eltTree.linkNodes('107','108')
eltTree.addNode('109','@disableCoord','LuceneCoreQuery.dtd.html#TermsQuery_disableCoord',false,false)
eltTree.linkNodes('107','109')
eltTree.addNode('110','@fieldName','LuceneCoreQuery.dtd.html#TermsQuery_fieldName',false,false)
eltTree.linkNodes('107','110')
eltTree.addNode('111','@minimumNumberShouldMatch','LuceneCoreQuery.dtd.html#TermsQuery_minimumNumberShouldMatch',false,false)
eltTree.linkNodes('107','111')
eltTree.addNode('112','<b>&lt;MatchAllDocsQuery/&gt;</b>','LuceneCoreQuery.dtd.html#MatchAllDocsQuery',false,false)
eltTree.linkNodes('103','112')
eltTree.addNode('113','<b>ConstantScoreQuery</b>','LuceneCoreQuery.dtd.html#ConstantScoreQuery',false,false)
eltTree.linkNodes('103','113')
eltTree.addNode('114','@boost','LuceneCoreQuery.dtd.html#ConstantScoreQuery_boost',false,false)
eltTree.addNode('106','@boost','LuceneCoreQuery.dtd.html#BooleanQuery_boost',false,false)
eltTree.linkNodes('105','106')
eltTree.addNode('107','@disableCoord','LuceneCoreQuery.dtd.html#BooleanQuery_disableCoord',false,false)
eltTree.linkNodes('105','107')
eltTree.addNode('108','@fieldName','LuceneCoreQuery.dtd.html#BooleanQuery_fieldName',false,false)
eltTree.linkNodes('105','108')
eltTree.addNode('109','@minimumNumberShouldMatch','LuceneCoreQuery.dtd.html#BooleanQuery_minimumNumberShouldMatch',false,false)
eltTree.linkNodes('105','109')
eltTree.addNode('110','<b><i>&lt;sequence&gt;+</i></b>',null,true,false)
eltTree.linkNodes('105','110')
eltTree.addNode('111','<b>Clause</b>','LuceneCoreQuery.dtd.html#Clause',false,false)
eltTree.linkNodes('110','111')
eltTree.addNode('112','@occurs','LuceneCoreQuery.dtd.html#Clause_occurs',false,false)
eltTree.linkNodes('111','112')
eltTree.addNode('113','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('111','113')
eltTree.linkNodes('113','105','<b>BooleanQuery</b>')
eltTree.addNode('114','<b>UserQuery</b>','LuceneCoreQuery.dtd.html#UserQuery',false,false)
eltTree.linkNodes('113','114')
eltTree.addNode('115','<i>&lt;choice&gt;*</i>',null,true,false)
eltTree.linkNodes('113','115')
eltTree.addNode('116','<b>&lt;RangeFilter/&gt;</b>','LuceneCoreQuery.dtd.html#RangeFilter',false,false)
eltTree.linkNodes('115','116')
eltTree.addNode('117','@fieldName','LuceneCoreQuery.dtd.html#RangeFilter_fieldName',false,false)
eltTree.linkNodes('116','117')
eltTree.addNode('118','@includeLower','LuceneCoreQuery.dtd.html#RangeFilter_includeLower',false,false)
eltTree.linkNodes('116','118')
eltTree.addNode('119','@includeUpper','LuceneCoreQuery.dtd.html#RangeFilter_includeUpper',false,false)
eltTree.linkNodes('116','119')
eltTree.addNode('120','<b>@lowerTerm</b>','LuceneCoreQuery.dtd.html#RangeFilter_lowerTerm',false,false)
eltTree.linkNodes('116','120')
eltTree.addNode('121','<b>@upperTerm</b>','LuceneCoreQuery.dtd.html#RangeFilter_upperTerm',false,false)
eltTree.linkNodes('116','121')
eltTree.addNode('122','<b>CachedFilter</b>','LuceneCoreQuery.dtd.html#CachedFilter',false,false)
eltTree.linkNodes('115','122')
eltTree.addNode('123','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('122','123')
eltTree.linkNodes('123','88','<b>BooleanQuery</b>')
eltTree.linkNodes('123','97','<b>UserQuery</b>')
eltTree.linkNodes('123','100','<b>FilteredQuery</b>')
eltTree.linkNodes('123','104','<b>TermQuery</b>')
eltTree.linkNodes('123','107','<b>TermsQuery</b>')
eltTree.linkNodes('123','112','<b>MatchAllDocsQuery</b>')
eltTree.linkNodes('123','113','<b>ConstantScoreQuery</b>')
eltTree.addNode('124','<b>SpanOr</b>','LuceneCoreQuery.dtd.html#SpanOr',false,false)
eltTree.linkNodes('123','124')
eltTree.addNode('125','<i>&lt;choice&gt;*</i>',null,true,false)
eltTree.addNode('115','@boost','LuceneCoreQuery.dtd.html#UserQuery_boost',false,false)
eltTree.linkNodes('114','115')
eltTree.addNode('116','@fieldName','LuceneCoreQuery.dtd.html#UserQuery_fieldName',false,false)
eltTree.linkNodes('114','116')
eltTree.addNode('117','<b>FilteredQuery</b>','LuceneCoreQuery.dtd.html#FilteredQuery',false,false)
eltTree.linkNodes('113','117')
eltTree.addNode('118','@boost','LuceneCoreQuery.dtd.html#FilteredQuery_boost',false,false)
eltTree.linkNodes('117','118')
eltTree.addNode('119','<b>Query</b>','LuceneCoreQuery.dtd.html#Query',false,false)
eltTree.linkNodes('117','119')
eltTree.addNode('120','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('119','120')
eltTree.linkNodes('120','105','<b>BooleanQuery</b>')
eltTree.linkNodes('120','114','<b>UserQuery</b>')
eltTree.linkNodes('120','117','<b>FilteredQuery</b>')
eltTree.addNode('121','<b>TermQuery</b>','LuceneCoreQuery.dtd.html#TermQuery',false,false)
eltTree.linkNodes('120','121')
eltTree.addNode('122','@boost','LuceneCoreQuery.dtd.html#TermQuery_boost',false,false)
eltTree.linkNodes('121','122')
eltTree.addNode('123','@fieldName','LuceneCoreQuery.dtd.html#TermQuery_fieldName',false,false)
eltTree.linkNodes('121','123')
eltTree.addNode('124','<b>TermsQuery</b>','LuceneCoreQuery.dtd.html#TermsQuery',false,false)
eltTree.linkNodes('120','124')
eltTree.addNode('125','@boost','LuceneCoreQuery.dtd.html#TermsQuery_boost',false,false)
eltTree.linkNodes('124','125')
eltTree.linkNodes('125','124','<b>SpanOr</b>')
eltTree.addNode('126','<b>SpanNear</b>','LuceneCoreQuery.dtd.html#SpanNear',false,false)
eltTree.linkNodes('125','126')
eltTree.addNode('127','@inOrder','LuceneCoreQuery.dtd.html#SpanNear_inOrder',false,false)
eltTree.linkNodes('126','127')
eltTree.addNode('128','<b>@slop</b>','LuceneCoreQuery.dtd.html#SpanNear_slop',false,false)
eltTree.linkNodes('126','128')
eltTree.addNode('129','<i>&lt;choice&gt;*</i>',null,true,false)
eltTree.linkNodes('126','129')
eltTree.linkNodes('129','124','<b>SpanOr</b>')
eltTree.linkNodes('129','126','<b>SpanNear</b>')
eltTree.addNode('130','<b>SpanOrTerms</b>','LuceneCoreQuery.dtd.html#SpanOrTerms',false,false)
eltTree.linkNodes('129','130')
eltTree.addNode('131','<b>@fieldName</b>','LuceneCoreQuery.dtd.html#SpanOrTerms_fieldName',false,false)
eltTree.addNode('126','@disableCoord','LuceneCoreQuery.dtd.html#TermsQuery_disableCoord',false,false)
eltTree.linkNodes('124','126')
eltTree.addNode('127','@fieldName','LuceneCoreQuery.dtd.html#TermsQuery_fieldName',false,false)
eltTree.linkNodes('124','127')
eltTree.addNode('128','@minimumNumberShouldMatch','LuceneCoreQuery.dtd.html#TermsQuery_minimumNumberShouldMatch',false,false)
eltTree.linkNodes('124','128')
eltTree.addNode('129','<b>&lt;MatchAllDocsQuery/&gt;</b>','LuceneCoreQuery.dtd.html#MatchAllDocsQuery',false,false)
eltTree.linkNodes('120','129')
eltTree.addNode('130','<b>ConstantScoreQuery</b>','LuceneCoreQuery.dtd.html#ConstantScoreQuery',false,false)
eltTree.linkNodes('120','130')
eltTree.addNode('131','@boost','LuceneCoreQuery.dtd.html#ConstantScoreQuery_boost',false,false)
eltTree.linkNodes('130','131')
eltTree.addNode('132','<b>SpanFirst</b>','LuceneCoreQuery.dtd.html#SpanFirst',false,false)
eltTree.linkNodes('129','132')
eltTree.addNode('133','@boost','LuceneCoreQuery.dtd.html#SpanFirst_boost',false,false)
eltTree.addNode('132','<i>&lt;choice&gt;*</i>',null,true,false)
eltTree.linkNodes('130','132')
eltTree.addNode('133','<b>&lt;RangeFilter/&gt;</b>','LuceneCoreQuery.dtd.html#RangeFilter',false,false)
eltTree.linkNodes('132','133')
eltTree.addNode('134','<b>@end</b>','LuceneCoreQuery.dtd.html#SpanFirst_end',false,false)
eltTree.linkNodes('132','134')
eltTree.addNode('135','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('132','135')
eltTree.linkNodes('135','124','<b>SpanOr</b>')
eltTree.linkNodes('135','126','<b>SpanNear</b>')
eltTree.linkNodes('135','130','<b>SpanOrTerms</b>')
eltTree.linkNodes('135','132','<b>SpanFirst</b>')
eltTree.addNode('136','<b>SpanNot</b>','LuceneCoreQuery.dtd.html#SpanNot',false,false)
eltTree.linkNodes('135','136')
eltTree.addNode('137','<b>Include</b>','LuceneCoreQuery.dtd.html#Include',false,false)
eltTree.linkNodes('136','137')
eltTree.addNode('138','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('137','138')
eltTree.linkNodes('138','124','<b>SpanOr</b>')
eltTree.linkNodes('138','126','<b>SpanNear</b>')
eltTree.linkNodes('138','130','<b>SpanOrTerms</b>')
eltTree.linkNodes('138','132','<b>SpanFirst</b>')
eltTree.linkNodes('138','136','<b>SpanNot</b>')
eltTree.addNode('139','<b>SpanTerm</b>','LuceneCoreQuery.dtd.html#SpanTerm',false,false)
eltTree.linkNodes('138','139')
eltTree.addNode('140','<b>@fieldName</b>','LuceneCoreQuery.dtd.html#SpanTerm_fieldName',false,false)
eltTree.addNode('134','@fieldName','LuceneCoreQuery.dtd.html#RangeFilter_fieldName',false,false)
eltTree.linkNodes('133','134')
eltTree.addNode('135','@includeLower','LuceneCoreQuery.dtd.html#RangeFilter_includeLower',false,false)
eltTree.linkNodes('133','135')
eltTree.addNode('136','@includeUpper','LuceneCoreQuery.dtd.html#RangeFilter_includeUpper',false,false)
eltTree.linkNodes('133','136')
eltTree.addNode('137','<b>@lowerTerm</b>','LuceneCoreQuery.dtd.html#RangeFilter_lowerTerm',false,false)
eltTree.linkNodes('133','137')
eltTree.addNode('138','<b>@upperTerm</b>','LuceneCoreQuery.dtd.html#RangeFilter_upperTerm',false,false)
eltTree.linkNodes('133','138')
eltTree.addNode('139','<b>&lt;NumericRangeFilter/&gt;</b>','LuceneCoreQuery.dtd.html#NumericRangeFilter',false,false)
eltTree.linkNodes('132','139')
eltTree.addNode('140','@fieldName','LuceneCoreQuery.dtd.html#NumericRangeFilter_fieldName',false,false)
eltTree.linkNodes('139','140')
eltTree.addNode('141','<b>Exclude</b>','LuceneCoreQuery.dtd.html#Exclude',false,false)
eltTree.linkNodes('136','141')
eltTree.addNode('142','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('141','142')
eltTree.linkNodes('142','124','<b>SpanOr</b>')
eltTree.linkNodes('142','126','<b>SpanNear</b>')
eltTree.linkNodes('142','130','<b>SpanOrTerms</b>')
eltTree.linkNodes('142','132','<b>SpanFirst</b>')
eltTree.linkNodes('142','136','<b>SpanNot</b>')
eltTree.linkNodes('142','139','<b>SpanTerm</b>')
eltTree.linkNodes('135','139','<b>SpanTerm</b>')
eltTree.linkNodes('129','136','<b>SpanNot</b>')
eltTree.linkNodes('129','139','<b>SpanTerm</b>')
eltTree.linkNodes('125','130','<b>SpanOrTerms</b>')
eltTree.linkNodes('125','132','<b>SpanFirst</b>')
eltTree.linkNodes('125','136','<b>SpanNot</b>')
eltTree.linkNodes('125','139','<b>SpanTerm</b>')
eltTree.linkNodes('123','126','<b>SpanNear</b>')
eltTree.linkNodes('123','130','<b>SpanOrTerms</b>')
eltTree.linkNodes('123','132','<b>SpanFirst</b>')
eltTree.linkNodes('123','136','<b>SpanNot</b>')
eltTree.linkNodes('123','139','<b>SpanTerm</b>')
eltTree.linkNodes('123','116','<b>RangeFilter</b>')
eltTree.linkNodes('123','122','<b>CachedFilter</b>')
eltTree.linkNodes('103','124','<b>SpanOr</b>')
eltTree.linkNodes('103','126','<b>SpanNear</b>')
eltTree.linkNodes('103','130','<b>SpanOrTerms</b>')
eltTree.linkNodes('103','132','<b>SpanFirst</b>')
eltTree.linkNodes('103','136','<b>SpanNot</b>')
eltTree.linkNodes('103','139','<b>SpanTerm</b>')
eltTree.addNode('143','<b>Filter</b>','LuceneCoreQuery.dtd.html#Filter',false,false)
eltTree.linkNodes('100','143')
eltTree.addNode('144','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('143','144')
eltTree.linkNodes('144','116','<b>RangeFilter</b>')
eltTree.linkNodes('144','122','<b>CachedFilter</b>')
eltTree.linkNodes('96','104','<b>TermQuery</b>')
eltTree.linkNodes('96','107','<b>TermsQuery</b>')
eltTree.linkNodes('96','112','<b>MatchAllDocsQuery</b>')
eltTree.linkNodes('96','113','<b>ConstantScoreQuery</b>')
eltTree.linkNodes('96','124','<b>SpanOr</b>')
eltTree.linkNodes('96','126','<b>SpanNear</b>')
eltTree.linkNodes('96','130','<b>SpanOrTerms</b>')
eltTree.linkNodes('96','132','<b>SpanFirst</b>')
eltTree.linkNodes('96','136','<b>SpanNot</b>')
eltTree.linkNodes('96','139','<b>SpanTerm</b>')
eltTree.linkNodes('96','116','<b>RangeFilter</b>')
eltTree.linkNodes('96','122','<b>CachedFilter</b>')
eltTree.linkNodes('87','122','CachedFilter')
eltTree.linkNodes('87','94','Clause')
eltTree.linkNodes('87','113','ConstantScoreQuery')
eltTree.linkNodes('87','141','Exclude')
eltTree.linkNodes('87','143','Filter')
eltTree.linkNodes('87','100','FilteredQuery')
eltTree.linkNodes('87','137','Include')
eltTree.linkNodes('87','112','MatchAllDocsQuery')
eltTree.linkNodes('87','102','Query')
eltTree.linkNodes('87','116','RangeFilter')
eltTree.linkNodes('87','132','SpanFirst')
eltTree.linkNodes('87','126','SpanNear')
eltTree.linkNodes('87','136','SpanNot')
eltTree.linkNodes('87','124','SpanOr')
eltTree.linkNodes('87','130','SpanOrTerms')
eltTree.linkNodes('87','139','SpanTerm')
eltTree.linkNodes('87','104','TermQuery')
eltTree.linkNodes('87','107','TermsQuery')
eltTree.linkNodes('87','97','UserQuery')
eltTree.addNode('141','@includeLower','LuceneCoreQuery.dtd.html#NumericRangeFilter_includeLower',false,false)
eltTree.linkNodes('139','141')
eltTree.addNode('142','@includeUpper','LuceneCoreQuery.dtd.html#NumericRangeFilter_includeUpper',false,false)
eltTree.linkNodes('139','142')
eltTree.addNode('143','<b>@lowerTerm</b>','LuceneCoreQuery.dtd.html#NumericRangeFilter_lowerTerm',false,false)
eltTree.linkNodes('139','143')
eltTree.addNode('144','@precisionStep','LuceneCoreQuery.dtd.html#NumericRangeFilter_precisionStep',false,false)
eltTree.linkNodes('139','144')
eltTree.addNode('145','@type','LuceneCoreQuery.dtd.html#NumericRangeFilter_type',false,false)
eltTree.linkNodes('139','145')
eltTree.addNode('146','<b>@upperTerm</b>','LuceneCoreQuery.dtd.html#NumericRangeFilter_upperTerm',false,false)
eltTree.linkNodes('139','146')
eltTree.addNode('147','<b>CachedFilter</b>','LuceneCoreQuery.dtd.html#CachedFilter',false,false)
eltTree.linkNodes('132','147')
eltTree.addNode('148','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('147','148')
eltTree.linkNodes('148','105','<b>BooleanQuery</b>')
eltTree.linkNodes('148','114','<b>UserQuery</b>')
eltTree.linkNodes('148','117','<b>FilteredQuery</b>')
eltTree.linkNodes('148','121','<b>TermQuery</b>')
eltTree.linkNodes('148','124','<b>TermsQuery</b>')
eltTree.linkNodes('148','129','<b>MatchAllDocsQuery</b>')
eltTree.linkNodes('148','130','<b>ConstantScoreQuery</b>')
eltTree.addNode('149','<b>BoostingTermQuery</b>','LuceneCoreQuery.dtd.html#BoostingTermQuery',false,false)
eltTree.linkNodes('148','149')
eltTree.addNode('150','<b>&lt;NumericRangeQuery/&gt;</b>','LuceneCoreQuery.dtd.html#NumericRangeQuery',false,false)
eltTree.linkNodes('148','150')
eltTree.addNode('151','@fieldName','LuceneCoreQuery.dtd.html#NumericRangeQuery_fieldName',false,false)
eltTree.linkNodes('150','151')
eltTree.addNode('152','@includeLower','LuceneCoreQuery.dtd.html#NumericRangeQuery_includeLower',false,false)
eltTree.linkNodes('150','152')
eltTree.addNode('153','@includeUpper','LuceneCoreQuery.dtd.html#NumericRangeQuery_includeUpper',false,false)
eltTree.linkNodes('150','153')
eltTree.addNode('154','<b>@lowerTerm</b>','LuceneCoreQuery.dtd.html#NumericRangeQuery_lowerTerm',false,false)
eltTree.linkNodes('150','154')
eltTree.addNode('155','@precisionStep','LuceneCoreQuery.dtd.html#NumericRangeQuery_precisionStep',false,false)
eltTree.linkNodes('150','155')
eltTree.addNode('156','@type','LuceneCoreQuery.dtd.html#NumericRangeQuery_type',false,false)
eltTree.linkNodes('150','156')
eltTree.addNode('157','<b>@upperTerm</b>','LuceneCoreQuery.dtd.html#NumericRangeQuery_upperTerm',false,false)
eltTree.linkNodes('150','157')
eltTree.addNode('158','<b>SpanOr</b>','LuceneCoreQuery.dtd.html#SpanOr',false,false)
eltTree.linkNodes('148','158')
eltTree.addNode('159','<i>&lt;choice&gt;*</i>',null,true,false)
eltTree.linkNodes('158','159')
eltTree.linkNodes('159','158','<b>SpanOr</b>')
eltTree.addNode('160','<b>SpanNear</b>','LuceneCoreQuery.dtd.html#SpanNear',false,false)
eltTree.linkNodes('159','160')
eltTree.addNode('161','@inOrder','LuceneCoreQuery.dtd.html#SpanNear_inOrder',false,false)
eltTree.linkNodes('160','161')
eltTree.addNode('162','<b>@slop</b>','LuceneCoreQuery.dtd.html#SpanNear_slop',false,false)
eltTree.linkNodes('160','162')
eltTree.addNode('163','<i>&lt;choice&gt;*</i>',null,true,false)
eltTree.linkNodes('160','163')
eltTree.linkNodes('163','158','<b>SpanOr</b>')
eltTree.linkNodes('163','160','<b>SpanNear</b>')
eltTree.addNode('164','<b>SpanOrTerms</b>','LuceneCoreQuery.dtd.html#SpanOrTerms',false,false)
eltTree.linkNodes('163','164')
eltTree.addNode('165','<b>@fieldName</b>','LuceneCoreQuery.dtd.html#SpanOrTerms_fieldName',false,false)
eltTree.linkNodes('164','165')
eltTree.addNode('166','<b>SpanFirst</b>','LuceneCoreQuery.dtd.html#SpanFirst',false,false)
eltTree.linkNodes('163','166')
eltTree.addNode('167','@boost','LuceneCoreQuery.dtd.html#SpanFirst_boost',false,false)
eltTree.linkNodes('166','167')
eltTree.addNode('168','<b>@end</b>','LuceneCoreQuery.dtd.html#SpanFirst_end',false,false)
eltTree.linkNodes('166','168')
eltTree.addNode('169','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('166','169')
eltTree.linkNodes('169','158','<b>SpanOr</b>')
eltTree.linkNodes('169','160','<b>SpanNear</b>')
eltTree.linkNodes('169','164','<b>SpanOrTerms</b>')
eltTree.linkNodes('169','166','<b>SpanFirst</b>')
eltTree.addNode('170','<b>SpanNot</b>','LuceneCoreQuery.dtd.html#SpanNot',false,false)
eltTree.linkNodes('169','170')
eltTree.addNode('171','<b>Include</b>','LuceneCoreQuery.dtd.html#Include',false,false)
eltTree.linkNodes('170','171')
eltTree.addNode('172','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('171','172')
eltTree.linkNodes('172','158','<b>SpanOr</b>')
eltTree.linkNodes('172','160','<b>SpanNear</b>')
eltTree.linkNodes('172','164','<b>SpanOrTerms</b>')
eltTree.linkNodes('172','166','<b>SpanFirst</b>')
eltTree.linkNodes('172','170','<b>SpanNot</b>')
eltTree.addNode('173','<b>SpanTerm</b>','LuceneCoreQuery.dtd.html#SpanTerm',false,false)
eltTree.linkNodes('172','173')
eltTree.addNode('174','<b>@fieldName</b>','LuceneCoreQuery.dtd.html#SpanTerm_fieldName',false,false)
eltTree.linkNodes('173','174')
eltTree.linkNodes('172','149','<b>BoostingTermQuery</b>')
eltTree.addNode('175','<b>Exclude</b>','LuceneCoreQuery.dtd.html#Exclude',false,false)
eltTree.linkNodes('170','175')
eltTree.addNode('176','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('175','176')
eltTree.linkNodes('176','158','<b>SpanOr</b>')
eltTree.linkNodes('176','160','<b>SpanNear</b>')
eltTree.linkNodes('176','164','<b>SpanOrTerms</b>')
eltTree.linkNodes('176','166','<b>SpanFirst</b>')
eltTree.linkNodes('176','170','<b>SpanNot</b>')
eltTree.linkNodes('176','173','<b>SpanTerm</b>')
eltTree.linkNodes('176','149','<b>BoostingTermQuery</b>')
eltTree.linkNodes('169','173','<b>SpanTerm</b>')
eltTree.linkNodes('169','149','<b>BoostingTermQuery</b>')
eltTree.linkNodes('163','170','<b>SpanNot</b>')
eltTree.linkNodes('163','173','<b>SpanTerm</b>')
eltTree.linkNodes('163','149','<b>BoostingTermQuery</b>')
eltTree.linkNodes('159','164','<b>SpanOrTerms</b>')
eltTree.linkNodes('159','166','<b>SpanFirst</b>')
eltTree.linkNodes('159','170','<b>SpanNot</b>')
eltTree.linkNodes('159','173','<b>SpanTerm</b>')
eltTree.linkNodes('159','149','<b>BoostingTermQuery</b>')
eltTree.linkNodes('148','160','<b>SpanNear</b>')
eltTree.linkNodes('148','164','<b>SpanOrTerms</b>')
eltTree.linkNodes('148','166','<b>SpanFirst</b>')
eltTree.linkNodes('148','170','<b>SpanNot</b>')
eltTree.linkNodes('148','173','<b>SpanTerm</b>')
eltTree.linkNodes('148','149','<b>BoostingTermQuery</b>')
eltTree.linkNodes('148','133','<b>RangeFilter</b>')
eltTree.linkNodes('148','139','<b>NumericRangeFilter</b>')
eltTree.linkNodes('148','147','<b>CachedFilter</b>')
eltTree.linkNodes('120','149','<b>BoostingTermQuery</b>')
eltTree.linkNodes('120','150','<b>NumericRangeQuery</b>')
eltTree.linkNodes('120','158','<b>SpanOr</b>')
eltTree.linkNodes('120','160','<b>SpanNear</b>')
eltTree.linkNodes('120','164','<b>SpanOrTerms</b>')
eltTree.linkNodes('120','166','<b>SpanFirst</b>')
eltTree.linkNodes('120','170','<b>SpanNot</b>')
eltTree.linkNodes('120','173','<b>SpanTerm</b>')
eltTree.linkNodes('120','149','<b>BoostingTermQuery</b>')
eltTree.addNode('177','<b>Filter</b>','LuceneCoreQuery.dtd.html#Filter',false,false)
eltTree.linkNodes('117','177')
eltTree.addNode('178','<b><i>&lt;choice&gt;</i></b>',null,true,false)
eltTree.linkNodes('177','178')
eltTree.linkNodes('178','133','<b>RangeFilter</b>')
eltTree.linkNodes('178','139','<b>NumericRangeFilter</b>')
eltTree.linkNodes('178','147','<b>CachedFilter</b>')
eltTree.linkNodes('113','121','<b>TermQuery</b>')
eltTree.linkNodes('113','124','<b>TermsQuery</b>')
eltTree.linkNodes('113','129','<b>MatchAllDocsQuery</b>')
eltTree.linkNodes('113','130','<b>ConstantScoreQuery</b>')
eltTree.linkNodes('113','149','<b>BoostingTermQuery</b>')
eltTree.linkNodes('113','150','<b>NumericRangeQuery</b>')
eltTree.linkNodes('113','158','<b>SpanOr</b>')
eltTree.linkNodes('113','160','<b>SpanNear</b>')
eltTree.linkNodes('113','164','<b>SpanOrTerms</b>')
eltTree.linkNodes('113','166','<b>SpanFirst</b>')
eltTree.linkNodes('113','170','<b>SpanNot</b>')
eltTree.linkNodes('113','173','<b>SpanTerm</b>')
eltTree.linkNodes('113','149','<b>BoostingTermQuery</b>')
eltTree.linkNodes('113','133','<b>RangeFilter</b>')
eltTree.linkNodes('113','139','<b>NumericRangeFilter</b>')
eltTree.linkNodes('113','147','<b>CachedFilter</b>')
eltTree.linkNodes('104','149','BoostingTermQuery')
eltTree.linkNodes('104','147','CachedFilter')
eltTree.linkNodes('104','111','Clause')
eltTree.linkNodes('104','130','ConstantScoreQuery')
eltTree.linkNodes('104','175','Exclude')
eltTree.linkNodes('104','177','Filter')
eltTree.linkNodes('104','117','FilteredQuery')
eltTree.linkNodes('104','171','Include')
eltTree.linkNodes('104','129','MatchAllDocsQuery')
eltTree.linkNodes('104','139','NumericRangeFilter')
eltTree.linkNodes('104','150','NumericRangeQuery')
eltTree.linkNodes('104','119','Query')
eltTree.linkNodes('104','133','RangeFilter')
eltTree.linkNodes('104','166','SpanFirst')
eltTree.linkNodes('104','160','SpanNear')
eltTree.linkNodes('104','170','SpanNot')
eltTree.linkNodes('104','158','SpanOr')
eltTree.linkNodes('104','164','SpanOrTerms')
eltTree.linkNodes('104','173','SpanTerm')
eltTree.linkNodes('104','121','TermQuery')
eltTree.linkNodes('104','124','TermsQuery')
eltTree.linkNodes('104','114','UserQuery')
document.write(eltTree);
//-->
</script>

View File

@ -70,13 +70,14 @@ public class CoreParser implements QueryBuilder
this.parser=parser;
filterFactory = new FilterBuilderFactory();
filterFactory.addBuilder("RangeFilter",new RangeFilterBuilder());
filterFactory.addBuilder("NumericRangeFilter",new NumericRangeFilterBuilder());
queryFactory = new QueryBuilderFactory();
queryFactory.addBuilder("TermQuery",new TermQueryBuilder());
queryFactory.addBuilder("TermsQuery",new TermsQueryBuilder(analyzer));
queryFactory.addBuilder("MatchAllDocsQuery",new MatchAllDocsQueryBuilder());
queryFactory.addBuilder("BooleanQuery",new BooleanQueryBuilder(queryFactory));
queryFactory.addBuilder("NumericRangeQuery",new NumericRangeQueryBuilder());
if(parser!=null)
{
queryFactory.addBuilder("UserQuery",new UserInputQueryBuilder(parser));

View File

@ -0,0 +1,165 @@
package org.apache.lucene.xmlparser.builders;
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.io.IOException;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.search.DocIdSet;
import org.apache.lucene.search.Filter;
import org.apache.lucene.search.NumericRangeFilter;
import org.apache.lucene.util.NumericUtils;
import org.apache.lucene.xmlparser.DOMUtils;
import org.apache.lucene.xmlparser.FilterBuilder;
import org.apache.lucene.xmlparser.ParserException;
import org.w3c.dom.Element;
/**
* Creates a {@link NumericRangeFilter}. The table below specifies the required
* attributes and the defaults if optional attributes are omitted. For more
* detail on what each of the attributes actually do, consult the documentation
* for {@link NumericRangeFilter}:
* <table>
* <tr>
* <th>Attribute name</th>
* <th>Values</th>
* <th>Required</th>
* <th>Default</th>
* </tr>
* <tr>
* <td>fieldName</td>
* <td>String</td>
* <td>Yes</td>
* <td>N/A</td>
* </tr>
* <tr>
* <td>lowerTerm</td>
* <td>Specified by <tt>type</tt></td>
* <td>Yes</td>
* <td>N/A</td>
* </tr>
* <tr>
* <td>upperTerm</td>
* <td>Specified by <tt>type</tt></td>
* <td>Yes</td>
* <td>N/A</td>
* </tr>
* <tr>
* <td>type</td>
* <td>int, long, float, double</td>
* <td>No</td>
* <td>int</td>
* </tr>
* <tr>
* <td>includeLower</td>
* <td>true, false</td>
* <td>No</td>
* <td>true</td>
* </tr>
* <tr>
* <td>includeUpper</td>
* <td>true, false</td>
* <td>No</td>
* <td>true</td>
* </tr>
* <tr>
* <td>precisionStep</td>
* <td>Integer</td>
* <td>No</td>
* <td>4</td>
* </tr>
* </table>
* <p>
* If an error occurs parsing the supplied <tt>lowerTerm</tt> or
* <tt>upperTerm</tt> into the numeric type specified by <tt>type</tt>, then the
* error will be silently ignored and the resulting filter will not match any
* documents.
*/
public class NumericRangeFilterBuilder implements FilterBuilder {
private static final NoMatchFilter NO_MATCH_FILTER = new NoMatchFilter();
private boolean strictMode = false;
/**
* Specifies how this {@link NumericRangeFilterBuilder} will handle errors.
* <p>
* If this is set to true, {@link #getFilter(Element)} will throw a
* {@link ParserException} if it is unable to parse the lowerTerm or upperTerm
* into the appropriate numeric type. If this is set to false, then this
* exception will be silently ignored and the resulting filter will not match
* any documents.
* <p>
* Defaults to false.
*
* @param strictMode
*/
public void setStrictMode(boolean strictMode) {
this.strictMode = strictMode;
}
public Filter getFilter(Element e) throws ParserException {
String field = DOMUtils.getAttributeWithInheritanceOrFail(e, "fieldName");
String lowerTerm = DOMUtils.getAttributeOrFail(e, "lowerTerm");
String upperTerm = DOMUtils.getAttributeOrFail(e, "upperTerm");
boolean lowerInclusive = DOMUtils.getAttribute(e, "includeLower", true);
boolean upperInclusive = DOMUtils.getAttribute(e, "includeUpper", true);
int precisionStep = DOMUtils.getAttribute(e, "precisionStep", NumericUtils.PRECISION_STEP_DEFAULT);
String type = DOMUtils.getAttribute(e, "type", "int");
try {
Filter filter;
if (type.equalsIgnoreCase("int")) {
filter = NumericRangeFilter.newIntRange(field, precisionStep, Integer
.valueOf(lowerTerm), Integer.valueOf(upperTerm), lowerInclusive,
upperInclusive);
} else if (type.equalsIgnoreCase("long")) {
filter = NumericRangeFilter.newLongRange(field, precisionStep, Long
.valueOf(lowerTerm), Long.valueOf(upperTerm), lowerInclusive,
upperInclusive);
} else if (type.equalsIgnoreCase("double")) {
filter = NumericRangeFilter.newDoubleRange(field, precisionStep, Double
.valueOf(lowerTerm), Double.valueOf(upperTerm), lowerInclusive,
upperInclusive);
} else if (type.equalsIgnoreCase("float")) {
filter = NumericRangeFilter.newFloatRange(field, precisionStep, Float
.valueOf(lowerTerm), Float.valueOf(upperTerm), lowerInclusive,
upperInclusive);
} else {
throw new ParserException(
"type attribute must be one of: [long, int, double, float]");
}
return filter;
} catch (NumberFormatException nfe) {
if (strictMode) {
throw new ParserException(
"Could not parse lowerTerm or upperTerm into a number", nfe);
}
return NO_MATCH_FILTER;
}
}
static class NoMatchFilter extends Filter {
private static final long serialVersionUID = 1L;
@Override
public DocIdSet getDocIdSet(IndexReader reader) throws IOException {
return null;
}
}
}

View File

@ -0,0 +1,127 @@
package org.apache.lucene.xmlparser.builders;
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.apache.lucene.search.NumericRangeQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.util.NumericUtils;
import org.apache.lucene.xmlparser.DOMUtils;
import org.apache.lucene.xmlparser.ParserException;
import org.apache.lucene.xmlparser.QueryBuilder;
import org.w3c.dom.Element;
/**
* Creates a {@link NumericRangeQuery}. The table below specifies the required
* attributes and the defaults if optional attributes are omitted. For more
* detail on what each of the attributes actually do, consult the documentation
* for {@link NumericRangeQuery}:
* <table>
* <tr>
* <th>Attribute name</th>
* <th>Values</th>
* <th>Required</th>
* <th>Default</th>
* </tr>
* <tr>
* <td>fieldName</td>
* <td>String</td>
* <td>Yes</td>
* <td>N/A</td>
* </tr>
* <tr>
* <td>lowerTerm</td>
* <td>Specified by <tt>type</tt></td>
* <td>Yes</td>
* <td>N/A</td>
* </tr>
* <tr>
* <td>upperTerm</td>
* <td>Specified by <tt>type</tt></td>
* <td>Yes</td>
* <td>N/A</td>
* </tr>
* <tr>
* <td>type</td>
* <td>int, long, float, double</td>
* <td>No</td>
* <td>int</td>
* </tr>
* <tr>
* <td>includeLower</td>
* <td>true, false</td>
* <td>No</td>
* <td>true</td>
* </tr>
* <tr>
* <td>includeUpper</td>
* <td>true, false</td>
* <td>No</td>
* <td>true</td>
* </tr>
* <tr>
* <td>precisionStep</td>
* <td>Integer</td>
* <td>No</td>
* <td>4</td>
* </tr>
* </table>
* <p>
* A {@link ParserException} will be thrown if an error occurs parsing the
* supplied <tt>lowerTerm</tt> or <tt>upperTerm</tt> into the numeric type
* specified by <tt>type</tt>.
*/
public class NumericRangeQueryBuilder implements QueryBuilder {
public Query getQuery(Element e) throws ParserException {
String field = DOMUtils.getAttributeWithInheritanceOrFail(e, "fieldName");
String lowerTerm = DOMUtils.getAttributeOrFail(e, "lowerTerm");
String upperTerm = DOMUtils.getAttributeOrFail(e, "upperTerm");
boolean lowerInclusive = DOMUtils.getAttribute(e, "includeLower", true);
boolean upperInclusive = DOMUtils.getAttribute(e, "includeUpper", true);
int precisionStep = DOMUtils.getAttribute(e, "precisionStep", NumericUtils.PRECISION_STEP_DEFAULT);
String type = DOMUtils.getAttribute(e, "type", "int");
try {
Query filter;
if (type.equalsIgnoreCase("int")) {
filter = NumericRangeQuery.newIntRange(field, precisionStep, Integer
.valueOf(lowerTerm), Integer.valueOf(upperTerm), lowerInclusive,
upperInclusive);
} else if (type.equalsIgnoreCase("long")) {
filter = NumericRangeQuery.newLongRange(field, precisionStep, Long
.valueOf(lowerTerm), Long.valueOf(upperTerm), lowerInclusive,
upperInclusive);
} else if (type.equalsIgnoreCase("double")) {
filter = NumericRangeQuery.newDoubleRange(field, precisionStep, Double
.valueOf(lowerTerm), Double.valueOf(upperTerm), lowerInclusive,
upperInclusive);
} else if (type.equalsIgnoreCase("float")) {
filter = NumericRangeQuery.newFloatRange(field, precisionStep, Float
.valueOf(lowerTerm), Float.valueOf(upperTerm), lowerInclusive,
upperInclusive);
} else {
throw new ParserException(
"type attribute must be one of: [long, int, double, float]");
}
return filter;
} catch (NumberFormatException nfe) {
throw new ParserException(
"Could not parse lowerTerm or upperTerm into a number", nfe);
}
}
}

View File

@ -0,0 +1,216 @@
package com.apache.lucene.xmlparser.builders;
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import junit.framework.TestCase;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.IndexWriter.MaxFieldLength;
import org.apache.lucene.search.Filter;
import org.apache.lucene.search.NumericRangeFilter;
import org.apache.lucene.store.RAMDirectory;
import org.apache.lucene.xmlparser.ParserException;
import org.apache.lucene.xmlparser.builders.NumericRangeFilterBuilder;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
public class NumericRangeFilterBuilderTestCase extends TestCase {
public void testGetFilterHandleNumericParseErrorStrict() throws Exception {
NumericRangeFilterBuilder filterBuilder = new NumericRangeFilterBuilder();
filterBuilder.setStrictMode(true);
String xml = "<NumericRangeFilter fieldName='AGE' type='int' lowerTerm='-1' upperTerm='NaN'/>";
Document doc = getDocumentFromString(xml);
try {
filterBuilder.getFilter(doc.getDocumentElement());
} catch (ParserException e) {
return;
}
fail("Expected to throw " + ParserException.class);
}
public void testGetFilterHandleNumericParseError() throws Exception {
NumericRangeFilterBuilder filterBuilder = new NumericRangeFilterBuilder();
filterBuilder.setStrictMode(false);
String xml = "<NumericRangeFilter fieldName='AGE' type='int' lowerTerm='-1' upperTerm='NaN'/>";
Document doc = getDocumentFromString(xml);
Filter filter = filterBuilder.getFilter(doc.getDocumentElement());
RAMDirectory ramDir = new RAMDirectory();
IndexWriter writer = new IndexWriter(ramDir, null, MaxFieldLength.UNLIMITED);
try
{
IndexReader reader = IndexReader.open(ramDir, true);
try
{
assertNull(filter.getDocIdSet(reader));
}
finally
{
reader.close();
}
}
finally
{
writer.commit();
writer.close();
}
}
public void testGetFilterInt() throws Exception {
NumericRangeFilterBuilder filterBuilder = new NumericRangeFilterBuilder();
filterBuilder.setStrictMode(true);
String xml = "<NumericRangeFilter fieldName='AGE' type='int' lowerTerm='-1' upperTerm='10'/>";
Document doc = getDocumentFromString(xml);
Filter filter = filterBuilder.getFilter(doc.getDocumentElement());
assertTrue(filter instanceof NumericRangeFilter<?>);
@SuppressWarnings("unchecked")
NumericRangeFilter<Integer> numRangeFilter = (NumericRangeFilter<Integer>) filter;
assertEquals(Integer.valueOf(-1), numRangeFilter.getMin());
assertEquals(Integer.valueOf(10), numRangeFilter.getMax());
assertEquals("AGE", numRangeFilter.getField());
assertTrue(numRangeFilter.includesMin());
assertTrue(numRangeFilter.includesMax());
String xml2 = "<NumericRangeFilter fieldName='AGE' type='int' lowerTerm='-1' upperTerm='10' includeUpper='false'/>";
Document doc2 = getDocumentFromString(xml2);
Filter filter2 = filterBuilder.getFilter(doc2.getDocumentElement());
assertTrue(filter2 instanceof NumericRangeFilter<?>);
@SuppressWarnings("unchecked")
NumericRangeFilter<Integer> numRangeFilter2 = (NumericRangeFilter) filter2;
assertEquals(Integer.valueOf(-1), numRangeFilter2.getMin());
assertEquals(Integer.valueOf(10), numRangeFilter2.getMax());
assertEquals("AGE", numRangeFilter2.getField());
assertTrue(numRangeFilter2.includesMin());
assertFalse(numRangeFilter2.includesMax());
}
public void testGetFilterLong() throws Exception {
NumericRangeFilterBuilder filterBuilder = new NumericRangeFilterBuilder();
filterBuilder.setStrictMode(true);
String xml = "<NumericRangeFilter fieldName='AGE' type='LoNg' lowerTerm='-2321' upperTerm='60000000'/>";
Document doc = getDocumentFromString(xml);
Filter filter = filterBuilder.getFilter(doc.getDocumentElement());
assertTrue(filter instanceof NumericRangeFilter<?>);
@SuppressWarnings("unchecked")
NumericRangeFilter<Long> numRangeFilter = (NumericRangeFilter) filter;
assertEquals(Long.valueOf(-2321L), numRangeFilter.getMin());
assertEquals(Long.valueOf(60000000L), numRangeFilter.getMax());
assertEquals("AGE", numRangeFilter.getField());
assertTrue(numRangeFilter.includesMin());
assertTrue(numRangeFilter.includesMax());
String xml2 = "<NumericRangeFilter fieldName='AGE' type='LoNg' lowerTerm='-2321' upperTerm='60000000' includeUpper='false'/>";
Document doc2 = getDocumentFromString(xml2);
Filter filter2 = filterBuilder.getFilter(doc2.getDocumentElement());
assertTrue(filter2 instanceof NumericRangeFilter<?>);
@SuppressWarnings("unchecked")
NumericRangeFilter<Long> numRangeFilter2 = (NumericRangeFilter) filter2;
assertEquals(Long.valueOf(-2321L), numRangeFilter2.getMin());
assertEquals(Long.valueOf(60000000L), numRangeFilter2.getMax());
assertEquals("AGE", numRangeFilter2.getField());
assertTrue(numRangeFilter2.includesMin());
assertFalse(numRangeFilter2.includesMax());
}
public void testGetFilterDouble() throws Exception {
NumericRangeFilterBuilder filterBuilder = new NumericRangeFilterBuilder();
filterBuilder.setStrictMode(true);
String xml = "<NumericRangeFilter fieldName='AGE' type='doubLe' lowerTerm='-23.21' upperTerm='60000.00023'/>";
Document doc = getDocumentFromString(xml);
Filter filter = filterBuilder.getFilter(doc.getDocumentElement());
assertTrue(filter instanceof NumericRangeFilter<?>);
@SuppressWarnings("unchecked")
NumericRangeFilter<Double> numRangeFilter = (NumericRangeFilter) filter;
assertEquals(Double.valueOf(-23.21d), numRangeFilter.getMin());
assertEquals(Double.valueOf(60000.00023d), numRangeFilter.getMax());
assertEquals("AGE", numRangeFilter.getField());
assertTrue(numRangeFilter.includesMin());
assertTrue(numRangeFilter.includesMax());
String xml2 = "<NumericRangeFilter fieldName='AGE' type='doubLe' lowerTerm='-23.21' upperTerm='60000.00023' includeUpper='false'/>";
Document doc2 = getDocumentFromString(xml2);
Filter filter2 = filterBuilder.getFilter(doc2.getDocumentElement());
assertTrue(filter2 instanceof NumericRangeFilter<?>);
@SuppressWarnings("unchecked")
NumericRangeFilter<Double> numRangeFilter2 = (NumericRangeFilter) filter2;
assertEquals(Double.valueOf(-23.21d), numRangeFilter2.getMin());
assertEquals(Double.valueOf(60000.00023d), numRangeFilter2.getMax());
assertEquals("AGE", numRangeFilter2.getField());
assertTrue(numRangeFilter2.includesMin());
assertFalse(numRangeFilter2.includesMax());
}
public void testGetFilterFloat() throws Exception {
NumericRangeFilterBuilder filterBuilder = new NumericRangeFilterBuilder();
filterBuilder.setStrictMode(true);
String xml = "<NumericRangeFilter fieldName='AGE' type='FLOAT' lowerTerm='-2.321432' upperTerm='32432.23'/>";
Document doc = getDocumentFromString(xml);
Filter filter = filterBuilder.getFilter(doc.getDocumentElement());
assertTrue(filter instanceof NumericRangeFilter<?>);
@SuppressWarnings("unchecked")
NumericRangeFilter<Float> numRangeFilter = (NumericRangeFilter) filter;
assertEquals(Float.valueOf(-2.321432f), numRangeFilter.getMin());
assertEquals(Float.valueOf(32432.23f), numRangeFilter.getMax());
assertEquals("AGE", numRangeFilter.getField());
assertTrue(numRangeFilter.includesMin());
assertTrue(numRangeFilter.includesMax());
String xml2 = "<NumericRangeFilter fieldName='AGE' type='FLOAT' lowerTerm='-2.321432' upperTerm='32432.23' includeUpper='false' precisionStep='2' />";
Document doc2 = getDocumentFromString(xml2);
Filter filter2 = filterBuilder.getFilter(doc2.getDocumentElement());
assertTrue(filter2 instanceof NumericRangeFilter<?>);
@SuppressWarnings("unchecked")
NumericRangeFilter<Float> numRangeFilter2 = (NumericRangeFilter) filter2;
assertEquals(Float.valueOf(-2.321432f), numRangeFilter2.getMin());
assertEquals(Float.valueOf(32432.23f), numRangeFilter2.getMax());
assertEquals("AGE", numRangeFilter2.getField());
assertTrue(numRangeFilter2.includesMin());
assertFalse(numRangeFilter2.includesMax());
}
private static Document getDocumentFromString(String str)
throws SAXException, IOException, ParserConfigurationException {
InputStream is = new ByteArrayInputStream(str.getBytes());
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse(is);
is.close();
return doc;
}
}

View File

@ -0,0 +1,178 @@
package com.apache.lucene.xmlparser.builders;
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import junit.framework.TestCase;
import org.apache.lucene.search.NumericRangeQuery;
import org.apache.lucene.search.Query;
import org.apache.lucene.xmlparser.ParserException;
import org.apache.lucene.xmlparser.builders.NumericRangeQueryBuilder;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
public class NumericRangeQueryBuilderTestCase extends TestCase {
public void testGetFilterHandleNumericParseErrorStrict() throws Exception {
NumericRangeQueryBuilder filterBuilder = new NumericRangeQueryBuilder();
String xml = "<NumericRangeQuery fieldName='AGE' type='int' lowerTerm='-1' upperTerm='NaN'/>";
Document doc = getDocumentFromString(xml);
try {
filterBuilder.getQuery(doc.getDocumentElement());
} catch (ParserException e) {
return;
}
fail("Expected to throw " + ParserException.class);
}
public void testGetFilterInt() throws Exception {
NumericRangeQueryBuilder filterBuilder = new NumericRangeQueryBuilder();
String xml = "<NumericRangeQuery fieldName='AGE' type='int' lowerTerm='-1' upperTerm='10'/>";
Document doc = getDocumentFromString(xml);
Query filter = filterBuilder.getQuery(doc.getDocumentElement());
assertTrue(filter instanceof NumericRangeQuery<?>);
@SuppressWarnings("unchecked")
NumericRangeQuery<Integer> numRangeFilter = (NumericRangeQuery<Integer>) filter;
assertEquals(Integer.valueOf(-1), numRangeFilter.getMin());
assertEquals(Integer.valueOf(10), numRangeFilter.getMax());
assertEquals("AGE", numRangeFilter.getField());
assertTrue(numRangeFilter.includesMin());
assertTrue(numRangeFilter.includesMax());
String xml2 = "<NumericRangeQuery fieldName='AGE' type='int' lowerTerm='-1' upperTerm='10' includeUpper='false'/>";
Document doc2 = getDocumentFromString(xml2);
Query filter2 = filterBuilder.getQuery(doc2.getDocumentElement());
assertTrue(filter2 instanceof NumericRangeQuery<?>);
@SuppressWarnings("unchecked")
NumericRangeQuery<Integer> numRangeFilter2 = (NumericRangeQuery) filter2;
assertEquals(Integer.valueOf(-1), numRangeFilter2.getMin());
assertEquals(Integer.valueOf(10), numRangeFilter2.getMax());
assertEquals("AGE", numRangeFilter2.getField());
assertTrue(numRangeFilter2.includesMin());
assertFalse(numRangeFilter2.includesMax());
}
public void testGetFilterLong() throws Exception {
NumericRangeQueryBuilder filterBuilder = new NumericRangeQueryBuilder();
String xml = "<NumericRangeQuery fieldName='AGE' type='LoNg' lowerTerm='-2321' upperTerm='60000000'/>";
Document doc = getDocumentFromString(xml);
Query filter = filterBuilder.getQuery(doc.getDocumentElement());
assertTrue(filter instanceof NumericRangeQuery<?>);
@SuppressWarnings("unchecked")
NumericRangeQuery<Long> numRangeFilter = (NumericRangeQuery) filter;
assertEquals(Long.valueOf(-2321L), numRangeFilter.getMin());
assertEquals(Long.valueOf(60000000L), numRangeFilter.getMax());
assertEquals("AGE", numRangeFilter.getField());
assertTrue(numRangeFilter.includesMin());
assertTrue(numRangeFilter.includesMax());
String xml2 = "<NumericRangeQuery fieldName='AGE' type='LoNg' lowerTerm='-2321' upperTerm='60000000' includeUpper='false'/>";
Document doc2 = getDocumentFromString(xml2);
Query filter2 = filterBuilder.getQuery(doc2.getDocumentElement());
assertTrue(filter2 instanceof NumericRangeQuery<?>);
@SuppressWarnings("unchecked")
NumericRangeQuery<Long> numRangeFilter2 = (NumericRangeQuery) filter2;
assertEquals(Long.valueOf(-2321L), numRangeFilter2.getMin());
assertEquals(Long.valueOf(60000000L), numRangeFilter2.getMax());
assertEquals("AGE", numRangeFilter2.getField());
assertTrue(numRangeFilter2.includesMin());
assertFalse(numRangeFilter2.includesMax());
}
public void testGetFilterDouble() throws Exception {
NumericRangeQueryBuilder filterBuilder = new NumericRangeQueryBuilder();
String xml = "<NumericRangeQuery fieldName='AGE' type='doubLe' lowerTerm='-23.21' upperTerm='60000.00023'/>";
Document doc = getDocumentFromString(xml);
Query filter = filterBuilder.getQuery(doc.getDocumentElement());
assertTrue(filter instanceof NumericRangeQuery<?>);
@SuppressWarnings("unchecked")
NumericRangeQuery<Double> numRangeFilter = (NumericRangeQuery) filter;
assertEquals(Double.valueOf(-23.21d), numRangeFilter.getMin());
assertEquals(Double.valueOf(60000.00023d), numRangeFilter.getMax());
assertEquals("AGE", numRangeFilter.getField());
assertTrue(numRangeFilter.includesMin());
assertTrue(numRangeFilter.includesMax());
String xml2 = "<NumericRangeQuery fieldName='AGE' type='doubLe' lowerTerm='-23.21' upperTerm='60000.00023' includeUpper='false'/>";
Document doc2 = getDocumentFromString(xml2);
Query filter2 = filterBuilder.getQuery(doc2.getDocumentElement());
assertTrue(filter2 instanceof NumericRangeQuery<?>);
@SuppressWarnings("unchecked")
NumericRangeQuery<Double> numRangeFilter2 = (NumericRangeQuery) filter2;
assertEquals(Double.valueOf(-23.21d), numRangeFilter2.getMin());
assertEquals(Double.valueOf(60000.00023d), numRangeFilter2.getMax());
assertEquals("AGE", numRangeFilter2.getField());
assertTrue(numRangeFilter2.includesMin());
assertFalse(numRangeFilter2.includesMax());
}
public void testGetFilterFloat() throws Exception {
NumericRangeQueryBuilder filterBuilder = new NumericRangeQueryBuilder();
String xml = "<NumericRangeQuery fieldName='AGE' type='FLOAT' lowerTerm='-2.321432' upperTerm='32432.23'/>";
Document doc = getDocumentFromString(xml);
Query filter = filterBuilder.getQuery(doc.getDocumentElement());
assertTrue(filter instanceof NumericRangeQuery<?>);
@SuppressWarnings("unchecked")
NumericRangeQuery<Float> numRangeFilter = (NumericRangeQuery) filter;
assertEquals(Float.valueOf(-2.321432f), numRangeFilter.getMin());
assertEquals(Float.valueOf(32432.23f), numRangeFilter.getMax());
assertEquals("AGE", numRangeFilter.getField());
assertTrue(numRangeFilter.includesMin());
assertTrue(numRangeFilter.includesMax());
String xml2 = "<NumericRangeQuery fieldName='AGE' type='FLOAT' lowerTerm='-2.321432' upperTerm='32432.23' includeUpper='false' precisionStep='2' />";
Document doc2 = getDocumentFromString(xml2);
Query filter2 = filterBuilder.getQuery(doc2.getDocumentElement());
assertTrue(filter2 instanceof NumericRangeQuery<?>);
@SuppressWarnings("unchecked")
NumericRangeQuery<Float> numRangeFilter2 = (NumericRangeQuery) filter2;
assertEquals(Float.valueOf(-2.321432f), numRangeFilter2.getMin());
assertEquals(Float.valueOf(32432.23f), numRangeFilter2.getMax());
assertEquals("AGE", numRangeFilter2.getField());
assertTrue(numRangeFilter2.includesMin());
assertFalse(numRangeFilter2.includesMax());
}
private static Document getDocumentFromString(String str)
throws SAXException, IOException, ParserConfigurationException {
InputStream is = new ByteArrayInputStream(str.getBytes());
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
DocumentBuilder builder = factory.newDocumentBuilder();
Document doc = builder.parse(is);
is.close();
return doc;
}
}

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<FilteredQuery>
<Query>
<BooleanQuery fieldName="contents">
<Clause occurs="should">
<TermQuery>merger</TermQuery>
</Clause>
<Clause occurs="mustnot">
<TermQuery >sumitomo</TermQuery>
</Clause>
<Clause occurs="must">
<TermQuery>bank</TermQuery>
</Clause>
</BooleanQuery>
</Query>
<Filter>
<NumericRangeFilter fieldName="date2" lowerTerm="19870409" upperTerm="19870412"/>
</Filter>
</FilteredQuery>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<BooleanQuery fieldName="contents">
<Clause occurs="should">
<TermQuery>merger</TermQuery>
</Clause>
<Clause occurs="mustnot">
<TermQuery >sumitomo</TermQuery>
</Clause>
<Clause occurs="must">
<TermQuery>bank</TermQuery>
</Clause>
<Clause occurs="must">
<NumericRangeQuery fieldName="date2" lowerTerm="19870409" upperTerm="19870412"/>
</Clause>
</BooleanQuery>

View File

@ -8,6 +8,7 @@ import java.io.InputStreamReader;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.NumericField;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexWriter;
import org.apache.lucene.index.IndexWriterConfig;
@ -70,6 +71,9 @@ public class TestParser extends LuceneTestCase {
org.apache.lucene.document.Document doc =new org.apache.lucene.document.Document();
doc.add(new Field("date",date,Field.Store.YES,Field.Index.ANALYZED));
doc.add(new Field("contents",content,Field.Store.YES,Field.Index.ANALYZED));
NumericField numericField = new NumericField("date2");
numericField.setIntValue(Integer.valueOf(date));
doc.add(numericField);
writer.addDocument(doc);
line=d.readLine();
}
@ -191,6 +195,18 @@ public class TestParser extends LuceneTestCase {
assertEquals("DuplicateFilterQuery should produce 1 result ", 1,h);
}
public void testNumericRangeFilterQueryXML() throws ParserException, IOException
{
Query q=parse("NumericRangeFilterQuery.xml");
dumpResults("NumericRangeFilter", q, 5);
}
public void testNumericRangeQueryQueryXML() throws ParserException, IOException
{
Query q=parse("NumericRangeQueryQuery.xml");
dumpResults("NumericRangeQuery", q, 5);
}
//================= Helper methods ===================================