pylucene 3.5.0-3
[pylucene.git] / lucene-java-3.5.0 / lucene / contrib / xml-query-parser / docs / LuceneCoreQuery.dtd.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html><head>
3 <meta http-equiv='CONTENT-TYPE' content='text/html; charset=UTF-8' />
4 <link rel='StyleSheet' href='DTDDocStyle.css' type='text/css' media='screen' />
5 <title>Core Lucene</title>
6 </head><body>
7 <p class='DTDSource'><b><code>LuceneCoreQuery.dtd</code></b>: <a href='LuceneCoreQuery.dtd.html'>Elements</a> - <a href='LuceneCoreQuery.dtd.entities.html'>Entities</a> - <a href='LuceneCoreQuery.dtd.org.html'>Source</a> | <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='LuceneCoreQuery.dtd.html' target='_top'>NO FRAMES</a></p><h1>Core Lucene</h1>
8 <p><h3>Background</h3>
9 This DTD describes the XML syntax used to perform advanced searches using the core Lucene search engine. The motivation behind the XML query syntax is:
10 <ol>
11 <li>To open up Lucene functionality to clients other than Java</li>
12 <li>To offer a form of expressing queries that can easily be
13 <ul>
14 <li>Persisted for logging/auditing purposes</li>
15 <li>Changed by editing text query templates (XSLT) without requiring a recompile/redeploy of applications</li>
16 <li>Serialized across networks (without requiring Java bytecode for Query logic deployed on clients)</li>
17 </ul>
18 </li>
19 <li>To provide a shorthand way of expressing query logic which echos the logical tree structure of query objects more closely than reading procedural Java query construction code</li>
20 <li>To bridge the growing gap between Lucene query/filtering functionality and the set of functionality accessible throught the standard Lucene QueryParser syntax</li>
21 <li>To provide a simply extensible syntax that does not require complex parser skills such as knowledge of JavaCC syntax</li>
22 </ol></p><p><h3>Syntax overview</h3>
23 Search syntax consists of two types of elements:
24 <ul>
25 <li><i>Queries</i></li>
26 <li><i>Filters</i></li>
27 </ul></p><p><h4>Queries</h4>
28 The root of any XML search must be a <i>Query</i> type element used to select content.
29 Queries typically score matches on documents using a number of different factors in order to provide relevant results first.
30 One common example of a query tag is the <a href="#UserQuery">UserQuery</a> element which uses the standard
31 Lucene QueryParser to parse Google-style search syntax provided by end users.</p><p><h4>Filters</h4>
32 Unlike Queries, <i>Filters</i> are not used to select or score content - they are simply used to filter <i>Query</i> output (see <a href="#FilteredQuery">FilteredQuery</a> for an example use of query filtering).
33 Because Filters simply offer a yes/no decision for each document in the index their output can be efficiently cached in memory as a <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/BitSet.html">Bitset</a> for
34 subsequent reuse (see <a href="#CachedFilter">CachedFilter</a> tag).</p><p><h4>Nesting elements</h4>
35 Many of the the elements can nest other elements to produce queries/filters of an arbitrary depth and complexity.
36 The <a href="#BooleanQuery">BooleanQuery</a> element is one such example which provides a means for combining other queries (including other BooleanQueries) using Boolean
37 logic to determine mandatory or optional elements.</p><p><h3>Advanced topics</h3>
38 <h4>Advanced positional testing - span queries</h4>
39 The <i>SpanQuery</i> class of queries allow for complex positional tests which not only look for certain combinations of words but in particular
40 positions in relation to each other and the documents containing them.</p><p>CoreParser.java is the Java class that encapsulates this parser behaviour.</p><br />
41 <a name='BooleanQuery'></a>
42 <br /><table class='elementTitle' summary="BooleanQuery"><tr><td class='leftElementTitle'>
43 &lt;BooleanQuery&gt;</td><td class='rightElementTitle'>
44 Child of <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#CachedFilter'>CachedFilter</a>
45 </td></tr></table>
46 <p>BooleanQuerys implement Boolean logic which controls how multiple Clauses should be interpreted.
47 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>
48 </p><pre>                 
49             &lt;BooleanQuery fieldName="contents"&gt;
50                      &lt;Clause occurs="should"&gt;
51                               &lt;TermQuery&gt;merger&lt;/TermQuery&gt;
52                      &lt;/Clause&gt;
53                      &lt;Clause occurs="mustnot"&gt;
54                               &lt;TermQuery&gt;sumitomo&lt;/TermQuery&gt;
55                      &lt;/Clause&gt;
56                      &lt;Clause occurs="must"&gt;
57                               &lt;TermQuery&gt;bank&lt;/TermQuery&gt;
58                      &lt;/Clause&gt;
59             &lt;/BooleanQuery&gt;
60
61                  </pre><p></p><blockquote><table summary='element info'><tr>
62 <td class='construct'><table summary="&lt;BooleanQuery&gt;'s children">
63 <thead>
64 <tr><th class='title' colspan='2'>&lt;BooleanQuery&gt;'s children</th></tr>
65 <tr><th colspan='2' height='1' class='ruler'></th></tr>
66 <tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
67 <tr><th colspan='2' height='1' class='ruler'></th></tr>
68 </thead>
69 <tbody><tr><td><a href='#Clause'>Clause</a></td><td>At least one</td></tr>
70 </tbody></table></td><td class='construct'><table  summary="&lt;BooleanQuery&gt;'s attributes"><tr>
71 <th class='title' colspan='3'>&lt;BooleanQuery&gt;'s attributes</th>
72 </tr>
73 <tr><th colspan='3' height='1' class='ruler'></th></tr>
74 <tr>
75 <th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
76 <tr><th colspan='3' height='1' class='ruler'></th></tr>
77 <tr><td><a href='#BooleanQuery_boost'>boost</a></td><td></td><td>1.0</td></tr><tr><td><a href='#BooleanQuery_disableCoord'>disableCoord</a></td><td>true, false</td><td>false</td></tr><tr><td><a href='#BooleanQuery_fieldName'>fieldName</a></td><td></td><td></td></tr><tr><td><a href='#BooleanQuery_minimumNumberShouldMatch'>minimumNumberShouldMatch</a></td><td></td><td>0</td></tr></table></td></tr></table></blockquote>
78 <span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#Clause'>Clause</a>)+</p><a name='BooleanQuery_boost'></a>
79 <br /><table class='attributeTitle' summary="boost"><tr><td class='leftAttributeTitle'>
80 @boost</td><td class='rightAttributeTitle'>
81 Attribute of <a href='#BooleanQuery'>BooleanQuery</a>
82 </td></tr></table>
83 <p>Optional boost for matches on this query. Values > 1</p><p><span class='inTextTitle'>Default value</span>: 1.0</p><a name='BooleanQuery_fieldName'></a>
84 <br /><table class='attributeTitle' summary="fieldName"><tr><td class='leftAttributeTitle'>
85 @fieldName</td><td class='rightAttributeTitle'>
86 Attribute of <a href='#BooleanQuery'>BooleanQuery</a>
87 </td></tr></table>
88 <p>fieldName can optionally be defined here as a default attribute used by all child elements</p><a name='BooleanQuery_disableCoord'></a>
89 <br /><table class='attributeTitle' summary="disableCoord"><tr><td class='leftAttributeTitle'>
90 @disableCoord</td><td class='rightAttributeTitle'>
91 Attribute of <a href='#BooleanQuery'>BooleanQuery</a>
92 </td></tr></table>
93 <p>The "Coordination factor" rewards documents that contain more of the optional clauses in this list. This flag can be used to turn off this factor.</p><p><span class='inTextTitle'>Possible values</span>: true, false - <span class='inTextTitle'>Default value</span>: false</p><a name='BooleanQuery_minimumNumberShouldMatch'></a>
94 <br /><table class='attributeTitle' summary="minimumNumberShouldMatch"><tr><td class='leftAttributeTitle'>
95 @minimumNumberShouldMatch</td><td class='rightAttributeTitle'>
96 Attribute of <a href='#BooleanQuery'>BooleanQuery</a>
97 </td></tr></table>
98 <p>The minimum number of optional clauses 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='Clause'></a>
99 <br /><table class='elementTitle' summary="Clause"><tr><td class='leftElementTitle'>
100 &lt;Clause&gt;</td><td class='rightElementTitle'>
101 Child of <a href='#BooleanQuery'>BooleanQuery</a>
102 </td></tr></table>
103 <p>NOTE: "Clause" tag has 2 modes of use - inside &lt;BooleanQuery> in which case only "query" types can be
104 child elements - while in a &lt;BooleanFilter> clause only "filter" types can be contained.</p><blockquote><table summary='element info'><tr>
105 <td class='construct'><table summary="&lt;Clause&gt;'s children">
106 <thead>
107 <tr><th class='title' colspan='2'>&lt;Clause&gt;'s children</th></tr>
108 <tr><th colspan='2' height='1' class='ruler'></th></tr>
109 <tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
110 <tr><th colspan='2' height='1' class='ruler'></th></tr>
111 </thead>
112 <tbody><tr><td><a href='#BooleanQuery'>BooleanQuery</a></td><td>One or none</td></tr>
113 <tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
114 <tr><td><a href='#CachedFilter'>CachedFilter</a></td><td>One or none</td></tr>
115 <tr><td><a href='#ConstantScoreQuery'>ConstantScoreQuery</a></td><td>One or none</td></tr>
116 <tr><td><a href='#FilteredQuery'>FilteredQuery</a></td><td>One or none</td></tr>
117 <tr><td><a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a></td><td>One or none</td></tr>
118 <tr><td><a href='#NumericRangeFilter'>NumericRangeFilter</a></td><td>One or none</td></tr>
119 <tr><td><a href='#NumericRangeQuery'>NumericRangeQuery</a></td><td>One or none</td></tr>
120 <tr><td><a href='#RangeFilter'>RangeFilter</a></td><td>One or none</td></tr>
121 <tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
122 <tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
123 <tr><td><a href='#SpanNot'>SpanNot</a></td><td>One or none</td></tr>
124 <tr><td><a href='#SpanOr'>SpanOr</a></td><td>One or none</td></tr>
125 <tr><td><a href='#SpanOrTerms'>SpanOrTerms</a></td><td>One or none</td></tr>
126 <tr><td><a href='#SpanTerm'>SpanTerm</a></td><td>One or none</td></tr>
127 <tr><td><a href='#TermQuery'>TermQuery</a></td><td>One or none</td></tr>
128 <tr><td><a href='#TermsQuery'>TermsQuery</a></td><td>One or none</td></tr>
129 <tr><td><a href='#UserQuery'>UserQuery</a></td><td>One or none</td></tr>
130 </tbody></table></td><td class='construct'><table  summary="&lt;Clause&gt;'s attributes"><tr>
131 <th class='title' colspan='3'>&lt;Clause&gt;'s attributes</th>
132 </tr>
133 <tr><th colspan='3' height='1' class='ruler'></th></tr>
134 <tr>
135 <th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
136 <tr><th colspan='3' height='1' class='ruler'></th></tr>
137 <tr><td><a href='#Clause_occurs'>occurs</a></td><td>should, must, mustnot</td><td>should</td></tr></table></td></tr></table></blockquote>
138 <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>
139 <br /><table class='attributeTitle' summary="occurs"><tr><td class='leftAttributeTitle'>
140 @occurs</td><td class='rightAttributeTitle'>
141 Attribute of <a href='#Clause'>Clause</a>
142 </td></tr></table>
143 <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>
144 <br /><table class='elementTitle' summary="CachedFilter"><tr><td class='leftElementTitle'>
145 &lt;CachedFilter&gt;</td><td class='rightElementTitle'>
146 Child of <a href='#Clause'>Clause</a>, <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>, <a href='#Filter'>Filter</a>
147 </td></tr></table>
148 <p>Caches any nested query or filter in an LRU (Least recently used) Cache. Cached queries, like filters, are turned into
149 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.
150 Queries that are cached as filters obviously retain none of the scoring information associated with results - they retain just
151 a Boolean yes/no record of which documents matched.</p><p><span class='inTextTitle'>Example:</span> <em>Search for documents about banks from the last 10 years - caching the commonly-used "last 10 year" filter as a BitSet in
152 RAM to eliminate the cost of building this filter from disk for every query</em>
153 </p><pre>                 
154             &lt;FilteredQuery&gt;
155                &lt;Query&gt;
156                   &lt;UserQuery&gt;bank&lt;/UserQuery&gt;
157                &lt;/Query&gt;   
158                &lt;Filter&gt;
159                   &lt;CachedFilter&gt;
160                      &lt;RangeFilter fieldName="date" lowerTerm="19970101" upperTerm="20070101"/&gt;
161                   &lt;/CachedFilter&gt;
162                &lt;/Filter&gt;  
163             &lt;/FilteredQuery&gt;
164                  </pre><p></p><blockquote><table summary='element info'><tr>
165 <td class='construct'><table summary="&lt;CachedFilter&gt;'s children">
166 <thead>
167 <tr><th class='title' colspan='2'>&lt;CachedFilter&gt;'s children</th></tr>
168 <tr><th colspan='2' height='1' class='ruler'></th></tr>
169 <tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
170 <tr><th colspan='2' height='1' class='ruler'></th></tr>
171 </thead>
172 <tbody><tr><td><a href='#BooleanQuery'>BooleanQuery</a></td><td>One or none</td></tr>
173 <tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
174 <tr><td><a href='#CachedFilter'>CachedFilter</a></td><td>One or none</td></tr>
175 <tr><td><a href='#ConstantScoreQuery'>ConstantScoreQuery</a></td><td>One or none</td></tr>
176 <tr><td><a href='#FilteredQuery'>FilteredQuery</a></td><td>One or none</td></tr>
177 <tr><td><a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a></td><td>One or none</td></tr>
178 <tr><td><a href='#NumericRangeFilter'>NumericRangeFilter</a></td><td>One or none</td></tr>
179 <tr><td><a href='#NumericRangeQuery'>NumericRangeQuery</a></td><td>One or none</td></tr>
180 <tr><td><a href='#RangeFilter'>RangeFilter</a></td><td>One or none</td></tr>
181 <tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
182 <tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
183 <tr><td><a href='#SpanNot'>SpanNot</a></td><td>One or none</td></tr>
184 <tr><td><a href='#SpanOr'>SpanOr</a></td><td>One or none</td></tr>
185 <tr><td><a href='#SpanOrTerms'>SpanOrTerms</a></td><td>One or none</td></tr>
186 <tr><td><a href='#SpanTerm'>SpanTerm</a></td><td>One or none</td></tr>
187 <tr><td><a href='#TermQuery'>TermQuery</a></td><td>One or none</td></tr>
188 <tr><td><a href='#TermsQuery'>TermsQuery</a></td><td>One or none</td></tr>
189 <tr><td><a href='#UserQuery'>UserQuery</a></td><td>One or none</td></tr>
190 </tbody></table></td></tr></table></blockquote>
191 <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>
192 <br /><table class='elementTitle' summary="UserQuery"><tr><td class='leftElementTitle'>
193 &lt;UserQuery&gt;</td><td class='rightElementTitle'>
194 Child of <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#CachedFilter'>CachedFilter</a>
195 </td></tr></table>
196 <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>
197 </p><pre>                 
198                &lt;UserQuery&gt;"John Smith" OR "John Doe"&lt;/UserQuery&gt;
199                  </pre><p></p><blockquote><table summary='element info'><tr>
200 <td class='construct'><table  summary="&lt;UserQuery&gt;'s attributes"><tr>
201 <th class='title' colspan='3'>&lt;UserQuery&gt;'s attributes</th>
202 </tr>
203 <tr><th colspan='3' height='1' class='ruler'></th></tr>
204 <tr>
205 <th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
206 <tr><th colspan='3' height='1' class='ruler'></th></tr>
207 <tr><td><a href='#UserQuery_boost'>boost</a></td><td></td><td>1.0</td></tr><tr><td><a href='#UserQuery_fieldName'>fieldName</a></td><td></td><td></td></tr></table></td></tr></table></blockquote>
208 <a name='UserQuery_boost'></a>
209 <br /><table class='attributeTitle' summary="boost"><tr><td class='leftAttributeTitle'>
210 @boost</td><td class='rightAttributeTitle'>
211 Attribute of <a href='#UserQuery'>UserQuery</a>
212 </td></tr></table>
213 <p>Optional boost for matches on this query. Values > 1</p><p><span class='inTextTitle'>Default value</span>: 1.0</p><a name='UserQuery_fieldName'></a>
214 <br /><table class='attributeTitle' summary="fieldName"><tr><td class='leftAttributeTitle'>
215 @fieldName</td><td class='rightAttributeTitle'>
216 Attribute of <a href='#UserQuery'>UserQuery</a>
217 </td></tr></table>
218 <p>fieldName can optionally be defined here to change the default field used in the QueryParser</p><a name='MatchAllDocsQuery'></a>
219 <br /><table class='elementTitle' summary="MatchAllDocsQuery"><tr><td class='leftElementTitle'>
220 &lt;MatchAllDocsQuery/&gt;</td><td class='rightElementTitle'>
221 Child of <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#CachedFilter'>CachedFilter</a>
222 </td></tr></table>
223 <p>A query which is used to match all documents. This has a couple of uses:
224 <ol>
225 <li> as a Clause in a BooleanQuery who's only other clause
226 is a "mustNot" match (Lucene requires at least one positive clause) and..</li>
227 <li> in a FilteredQuery where a Filter tag is effectively being
228 used to select content rather than it's usual role of filtering the results of a query.</li>
229 </ol></p><p><span class='inTextTitle'>Example:</span> <em>Effectively use a Filter as a query </em>
230 </p><pre>                 
231                &lt;FilteredQuery&gt;
232                  &lt;Query&gt;
233                     &lt;MatchAllDocsQuery/&gt;
234                  &lt;/Query&gt;
235                  &lt;Filter&gt;
236                      &lt;RangeFilter fieldName="date" lowerTerm="19870409" upperTerm="19870412"/&gt;
237                  &lt;/Filter&gt;        
238                &lt;/FilteredQuery&gt;            
239                </pre><p></p><p class='emptyTagNote'>This element is always empty.</p><a name='TermQuery'></a>
240 <br /><table class='elementTitle' summary="TermQuery"><tr><td class='leftElementTitle'>
241 &lt;TermQuery&gt;</td><td class='rightElementTitle'>
242 Child of <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#CachedFilter'>CachedFilter</a>
243 </td></tr></table>
244 <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>
245 </p><pre>                 
246                &lt;TermQuery fieldName="primaryKey"&gt;13424&lt;/TermQuery&gt;
247                </pre><p></p><blockquote><table summary='element info'><tr>
248 <td class='construct'><table  summary="&lt;TermQuery&gt;'s attributes"><tr>
249 <th class='title' colspan='3'>&lt;TermQuery&gt;'s attributes</th>
250 </tr>
251 <tr><th colspan='3' height='1' class='ruler'></th></tr>
252 <tr>
253 <th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
254 <tr><th colspan='3' height='1' class='ruler'></th></tr>
255 <tr><td><a href='#TermQuery_boost'>boost</a></td><td></td><td>1.0</td></tr><tr><td><a href='#TermQuery_fieldName'>fieldName</a></td><td></td><td></td></tr></table></td></tr></table></blockquote>
256 <a name='TermQuery_boost'></a>
257 <br /><table class='attributeTitle' summary="boost"><tr><td class='leftAttributeTitle'>
258 @boost</td><td class='rightAttributeTitle'>
259 Attribute of <a href='#TermQuery'>TermQuery</a>
260 </td></tr></table>
261 <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>
262 <br /><table class='attributeTitle' summary="fieldName"><tr><td class='leftAttributeTitle'>
263 @fieldName</td><td class='rightAttributeTitle'>
264 Attribute of <a href='#TermQuery'>TermQuery</a>
265 </td></tr></table>
266 <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>
267 <br /><table class='elementTitle' summary="BoostingTermQuery"><tr><td class='leftElementTitle'>
268 &lt;BoostingTermQuery&gt;</td><td class='rightElementTitle'>
269 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>
270 </td></tr></table>
271 <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>
272 <br /><table class='attributeTitle' summary="boost"><tr><td class='leftAttributeTitle'>
273 @boost</td><td class='rightAttributeTitle'>
274 Attribute of <a href='#TermQuery'>TermQuery</a>
275 </td></tr></table>
276 <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>
277 <br /><table class='attributeTitle' summary="fieldName"><tr><td class='leftAttributeTitle'>
278 @fieldName</td><td class='rightAttributeTitle'>
279 Attribute of <a href='#TermQuery'>TermQuery</a>
280 </td></tr></table>
281 <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>
282 <br /><table class='elementTitle' summary="TermsQuery"><tr><td class='leftElementTitle'>
283 &lt;TermsQuery&gt;</td><td class='rightElementTitle'>
284 Child of <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#CachedFilter'>CachedFilter</a>
285 </td></tr></table>
286 <p>The equivalent of a BooleanQuery with multiple optional TermQuery clauses.
287 Child text is analyzed using a field-specific choice of Analyzer to produce a set of terms that are ORed together in Boolean logic.
288 Unlike UserQuery element, this does not parse any special characters to control fuzzy/phrase/boolean logic and as such is incapable
289 of producing a Query parse error given any user input</p><p><span class='inTextTitle'>Example:</span> <em>Match on text from a database description (which may contain characters that
290 are illegal characters in the standard Lucene Query syntax used in the UserQuery tag</em>
291 </p><pre>                 
292                &lt;TermsQuery fieldName="description"&gt;Smith & Sons (Ltd) : incorporated 1982&lt;/TermsQuery&gt;
293                </pre><p></p><blockquote><table summary='element info'><tr>
294 <td class='construct'><table  summary="&lt;TermsQuery&gt;'s attributes"><tr>
295 <th class='title' colspan='3'>&lt;TermsQuery&gt;'s attributes</th>
296 </tr>
297 <tr><th colspan='3' height='1' class='ruler'></th></tr>
298 <tr>
299 <th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
300 <tr><th colspan='3' height='1' class='ruler'></th></tr>
301 <tr><td><a href='#TermsQuery_boost'>boost</a></td><td></td><td>1.0</td></tr><tr><td><a href='#TermsQuery_disableCoord'>disableCoord</a></td><td>true, false</td><td>false</td></tr><tr><td><a href='#TermsQuery_fieldName'>fieldName</a></td><td></td><td></td></tr><tr><td><a href='#TermsQuery_minimumNumberShouldMatch'>minimumNumberShouldMatch</a></td><td></td><td>0</td></tr></table></td></tr></table></blockquote>
302 <a name='TermsQuery_boost'></a>
303 <br /><table class='attributeTitle' summary="boost"><tr><td class='leftAttributeTitle'>
304 @boost</td><td class='rightAttributeTitle'>
305 Attribute of <a href='#TermsQuery'>TermsQuery</a>
306 </td></tr></table>
307 <p>Optional boost for matches on this query. Values > 1</p><p><span class='inTextTitle'>Default value</span>: 1.0</p><a name='TermsQuery_fieldName'></a>
308 <br /><table class='attributeTitle' summary="fieldName"><tr><td class='leftAttributeTitle'>
309 @fieldName</td><td class='rightAttributeTitle'>
310 Attribute of <a href='#TermsQuery'>TermsQuery</a>
311 </td></tr></table>
312 <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_disableCoord'></a>
313 <br /><table class='attributeTitle' summary="disableCoord"><tr><td class='leftAttributeTitle'>
314 @disableCoord</td><td class='rightAttributeTitle'>
315 Attribute of <a href='#TermsQuery'>TermsQuery</a>
316 </td></tr></table>
317 <p>The "Coordination factor" rewards documents that contain more of the terms in this list. This flag can be used to turn off this factor.</p><p><span class='inTextTitle'>Possible values</span>: true, false - <span class='inTextTitle'>Default value</span>: false</p><a name='TermsQuery_minimumNumberShouldMatch'></a>
318 <br /><table class='attributeTitle' summary="minimumNumberShouldMatch"><tr><td class='leftAttributeTitle'>
319 @minimumNumberShouldMatch</td><td class='rightAttributeTitle'>
320 Attribute of <a href='#TermsQuery'>TermsQuery</a>
321 </td></tr></table>
322 <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>
323 <br /><table class='elementTitle' summary="FilteredQuery"><tr><td class='leftElementTitle'>
324 &lt;FilteredQuery&gt;</td><td class='rightElementTitle'>
325 Child of <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#CachedFilter'>CachedFilter</a>
326 </td></tr></table>
327 <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>
328 </p><pre>                 
329                &lt;FilteredQuery&gt;
330                  &lt;Query&gt;
331                     &lt;UserQuery&gt;Lucene&lt;/UserQuery&gt;
332                  &lt;/Query&gt;
333                  &lt;Filter&gt;
334                      &lt;TermsFilter fieldName="status"&gt;published&lt;/TermsFilter&gt;
335                  &lt;/Filter&gt;        
336                &lt;/FilteredQuery&gt;            
337                </pre><p></p><blockquote><table summary='element info'><tr>
338 <td class='construct'><table summary="&lt;FilteredQuery&gt;'s children">
339 <thead>
340 <tr><th class='title' colspan='2'>&lt;FilteredQuery&gt;'s children</th></tr>
341 <tr><th colspan='2' height='1' class='ruler'></th></tr>
342 <tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
343 <tr><th colspan='2' height='1' class='ruler'></th></tr>
344 </thead>
345 <tbody><tr><td><a href='#Filter'>Filter</a></td><td>Only one</td></tr>
346 <tr><td><a href='#Query'>Query</a></td><td>Only one</td></tr>
347 </tbody></table></td><td class='construct'><table  summary="&lt;FilteredQuery&gt;'s attributes"><tr>
348 <th class='title' colspan='3'>&lt;FilteredQuery&gt;'s attributes</th>
349 </tr>
350 <tr><th colspan='3' height='1' class='ruler'></th></tr>
351 <tr>
352 <th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
353 <tr><th colspan='3' height='1' class='ruler'></th></tr>
354 <tr><td><a href='#FilteredQuery_boost'>boost</a></td><td></td><td>1.0</td></tr></table></td></tr></table></blockquote>
355 <span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#Query'>Query</a>, <a href='#Filter'>Filter</a>)</p><a name='FilteredQuery_boost'></a>
356 <br /><table class='attributeTitle' summary="boost"><tr><td class='leftAttributeTitle'>
357 @boost</td><td class='rightAttributeTitle'>
358 Attribute of <a href='#FilteredQuery'>FilteredQuery</a>
359 </td></tr></table>
360 <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>
361 <br /><table class='elementTitle' summary="Query"><tr><td class='leftElementTitle'>
362 &lt;Query&gt;</td><td class='rightElementTitle'>
363 Child of <a href='#FilteredQuery'>FilteredQuery</a>
364 </td></tr></table>
365 <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>
366 <td class='construct'><table summary="&lt;Query&gt;'s children">
367 <thead>
368 <tr><th class='title' colspan='2'>&lt;Query&gt;'s children</th></tr>
369 <tr><th colspan='2' height='1' class='ruler'></th></tr>
370 <tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
371 <tr><th colspan='2' height='1' class='ruler'></th></tr>
372 </thead>
373 <tbody><tr><td><a href='#BooleanQuery'>BooleanQuery</a></td><td>One or none</td></tr>
374 <tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
375 <tr><td><a href='#ConstantScoreQuery'>ConstantScoreQuery</a></td><td>One or none</td></tr>
376 <tr><td><a href='#FilteredQuery'>FilteredQuery</a></td><td>One or none</td></tr>
377 <tr><td><a href='#MatchAllDocsQuery'>MatchAllDocsQuery</a></td><td>One or none</td></tr>
378 <tr><td><a href='#NumericRangeQuery'>NumericRangeQuery</a></td><td>One or none</td></tr>
379 <tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
380 <tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
381 <tr><td><a href='#SpanNot'>SpanNot</a></td><td>One or none</td></tr>
382 <tr><td><a href='#SpanOr'>SpanOr</a></td><td>One or none</td></tr>
383 <tr><td><a href='#SpanOrTerms'>SpanOrTerms</a></td><td>One or none</td></tr>
384 <tr><td><a href='#SpanTerm'>SpanTerm</a></td><td>One or none</td></tr>
385 <tr><td><a href='#TermQuery'>TermQuery</a></td><td>One or none</td></tr>
386 <tr><td><a href='#TermsQuery'>TermsQuery</a></td><td>One or none</td></tr>
387 <tr><td><a href='#UserQuery'>UserQuery</a></td><td>One or none</td></tr>
388 </tbody></table></td></tr></table></blockquote>
389 <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>
390 <br /><table class='elementTitle' summary="Filter"><tr><td class='leftElementTitle'>
391 &lt;Filter&gt;</td><td class='rightElementTitle'>
392 Child of <a href='#FilteredQuery'>FilteredQuery</a>
393 </td></tr></table>
394 <p>The choice of Filter that MUST also be matched</p><blockquote><table summary='element info'><tr>
395 <td class='construct'><table summary="&lt;Filter&gt;'s children">
396 <thead>
397 <tr><th class='title' colspan='2'>&lt;Filter&gt;'s children</th></tr>
398 <tr><th colspan='2' height='1' class='ruler'></th></tr>
399 <tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
400 <tr><th colspan='2' height='1' class='ruler'></th></tr>
401 </thead>
402 <tbody><tr><td><a href='#CachedFilter'>CachedFilter</a></td><td>One or none</td></tr>
403 <tr><td><a href='#NumericRangeFilter'>NumericRangeFilter</a></td><td>One or none</td></tr>
404 <tr><td><a href='#RangeFilter'>RangeFilter</a></td><td>One or none</td></tr>
405 </tbody></table></td></tr></table></blockquote>
406 <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>
407 <br /><table class='elementTitle' summary="RangeFilter"><tr><td class='leftElementTitle'>
408 &lt;RangeFilter/&gt;</td><td class='rightElementTitle'>
409 Child of <a href='#Clause'>Clause</a>, <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>, <a href='#Filter'>Filter</a>, <a href='#CachedFilter'>CachedFilter</a>
410 </td></tr></table>
411 <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>
412 </p><pre>                 
413             &lt;FilteredQuery&gt;
414                &lt;Query&gt;
415                   &lt;UserQuery&gt;bank&lt;/UserQuery&gt;
416                &lt;/Query&gt;   
417                &lt;Filter&gt;
418                      &lt;RangeFilter fieldName="date" lowerTerm="19970101" upperTerm="20070101"/&gt;
419                &lt;/Filter&gt;  
420             &lt;/FilteredQuery&gt;
421                  </pre><p></p><blockquote>
422 <table  summary="&lt;RangeFilter&gt;'s attributes"><tr>
423 <th class='title' colspan='3'>&lt;RangeFilter&gt;'s attributes</th>
424 </tr>
425 <tr><th colspan='3' height='1' class='ruler'></th></tr>
426 <tr>
427 <th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
428 <tr><th colspan='3' height='1' class='ruler'></th></tr>
429 <tr><td><a href='#RangeFilter_fieldName'>fieldName</a></td><td></td><td></td></tr><tr><td><a href='#RangeFilter_includeLower'>includeLower</a></td><td>true, false</td><td>true</td></tr><tr><td><a href='#RangeFilter_includeUpper'>includeUpper</a></td><td>true, false</td><td>true</td></tr><tr><td><a href='#RangeFilter_lowerTerm'>lowerTerm</a></td><td></td><td></td></tr><tr><td><a href='#RangeFilter_upperTerm'>upperTerm</a></td><td></td><td></td></tr></table></blockquote>
430 <p class='emptyTagNote'>This element is always empty.</p><a name='RangeFilter_fieldName'></a>
431 <br /><table class='attributeTitle' summary="fieldName"><tr><td class='leftAttributeTitle'>
432 @fieldName</td><td class='rightAttributeTitle'>
433 Attribute of <a href='#RangeFilter'>RangeFilter</a>
434 </td></tr></table>
435 <p>fieldName must be defined here or is taken from the most immediate parent XML element that defines a "fieldName" attribute</p><a name='RangeFilter_lowerTerm'></a>
436 <br /><table class='attributeTitle' summary="lowerTerm"><tr><td class='leftAttributeTitle'>
437 @lowerTerm</td><td class='rightAttributeTitle'>
438 Attribute of <a href='#RangeFilter'>RangeFilter</a>
439 </td></tr></table>
440 <p>The lower-most term value for this field (must be &lt;= upperTerm)</p><p><span class='inTextTitle'>Required</span></p><a name='RangeFilter_upperTerm'></a>
441 <br /><table class='attributeTitle' summary="upperTerm"><tr><td class='leftAttributeTitle'>
442 @upperTerm</td><td class='rightAttributeTitle'>
443 Attribute of <a href='#RangeFilter'>RangeFilter</a>
444 </td></tr></table>
445 <p>The upper-most term value for this field (must be >= lowerTerm)</p><p><span class='inTextTitle'>Required</span></p><a name='RangeFilter_includeLower'></a>
446 <br /><table class='attributeTitle' summary="includeLower"><tr><td class='leftAttributeTitle'>
447 @includeLower</td><td class='rightAttributeTitle'>
448 Attribute of <a href='#RangeFilter'>RangeFilter</a>
449 </td></tr></table>
450 <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='RangeFilter_includeUpper'></a>
451 <br /><table class='attributeTitle' summary="includeUpper"><tr><td class='leftAttributeTitle'>
452 @includeUpper</td><td class='rightAttributeTitle'>
453 Attribute of <a href='#RangeFilter'>RangeFilter</a>
454 </td></tr></table>
455 <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>
456 <br /><table class='elementTitle' summary="NumericRangeQuery"><tr><td class='leftElementTitle'>
457 &lt;NumericRangeQuery/&gt;</td><td class='rightElementTitle'>
458 Child of <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#CachedFilter'>CachedFilter</a>
459 </td></tr></table>
460 <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>
461 </p><pre>                 
462             &lt;NumericRangeQuery fieldName="age" lowerTerm="20" upperTerm="25" /&gt;
463                  </pre><p></p><blockquote>
464 <table  summary="&lt;NumericRangeQuery&gt;'s attributes"><tr>
465 <th class='title' colspan='3'>&lt;NumericRangeQuery&gt;'s attributes</th>
466 </tr>
467 <tr><th colspan='3' height='1' class='ruler'></th></tr>
468 <tr>
469 <th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
470 <tr><th colspan='3' height='1' class='ruler'></th></tr>
471 <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>
472 <p class='emptyTagNote'>This element is always empty.</p><a name='NumericRangeQuery_fieldName'></a>
473 <br /><table class='attributeTitle' summary="fieldName"><tr><td class='leftAttributeTitle'>
474 @fieldName</td><td class='rightAttributeTitle'>
475 Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
476 </td></tr></table>
477 <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>
478 <br /><table class='attributeTitle' summary="lowerTerm"><tr><td class='leftAttributeTitle'>
479 @lowerTerm</td><td class='rightAttributeTitle'>
480 Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
481 </td></tr></table>
482 <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>
483 <br /><table class='attributeTitle' summary="upperTerm"><tr><td class='leftAttributeTitle'>
484 @upperTerm</td><td class='rightAttributeTitle'>
485 Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
486 </td></tr></table>
487 <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>
488 <br /><table class='attributeTitle' summary="type"><tr><td class='leftAttributeTitle'>
489 @type</td><td class='rightAttributeTitle'>
490 Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
491 </td></tr></table>
492 <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>
493 <br /><table class='attributeTitle' summary="includeLower"><tr><td class='leftAttributeTitle'>
494 @includeLower</td><td class='rightAttributeTitle'>
495 Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
496 </td></tr></table>
497 <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>
498 <br /><table class='attributeTitle' summary="includeUpper"><tr><td class='leftAttributeTitle'>
499 @includeUpper</td><td class='rightAttributeTitle'>
500 Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
501 </td></tr></table>
502 <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>
503 <br /><table class='attributeTitle' summary="precisionStep"><tr><td class='leftAttributeTitle'>
504 @precisionStep</td><td class='rightAttributeTitle'>
505 Attribute of <a href='#NumericRangeQuery'>NumericRangeQuery</a>
506 </td></tr></table>
507 <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>
508 <br /><table class='elementTitle' summary="NumericRangeFilter"><tr><td class='leftElementTitle'>
509 &lt;NumericRangeFilter/&gt;</td><td class='rightElementTitle'>
510 Child of <a href='#Clause'>Clause</a>, <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>, <a href='#Filter'>Filter</a>, <a href='#CachedFilter'>CachedFilter</a>
511 </td></tr></table>
512 <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>
513 </p><pre>                 
514             &lt;FilteredQuery&gt;
515                &lt;Query&gt;
516                   &lt;UserQuery&gt;person&lt;/UserQuery&gt;
517                &lt;/Query&gt;   
518                &lt;Filter&gt;
519                      &lt;NumericRangeFilter fieldName="age" lowerTerm="20" upperTerm="25"/&gt;
520                &lt;/Filter&gt;  
521             &lt;/FilteredQuery&gt;
522                  </pre><p></p><blockquote>
523 <table  summary="&lt;NumericRangeFilter&gt;'s attributes"><tr>
524 <th class='title' colspan='3'>&lt;NumericRangeFilter&gt;'s attributes</th>
525 </tr>
526 <tr><th colspan='3' height='1' class='ruler'></th></tr>
527 <tr>
528 <th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
529 <tr><th colspan='3' height='1' class='ruler'></th></tr>
530 <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>
531 <p class='emptyTagNote'>This element is always empty.</p><a name='NumericRangeFilter_fieldName'></a>
532 <br /><table class='attributeTitle' summary="fieldName"><tr><td class='leftAttributeTitle'>
533 @fieldName</td><td class='rightAttributeTitle'>
534 Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
535 </td></tr></table>
536 <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>
537 <br /><table class='attributeTitle' summary="lowerTerm"><tr><td class='leftAttributeTitle'>
538 @lowerTerm</td><td class='rightAttributeTitle'>
539 Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
540 </td></tr></table>
541 <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>
542 <br /><table class='attributeTitle' summary="upperTerm"><tr><td class='leftAttributeTitle'>
543 @upperTerm</td><td class='rightAttributeTitle'>
544 Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
545 </td></tr></table>
546 <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>
547 <br /><table class='attributeTitle' summary="type"><tr><td class='leftAttributeTitle'>
548 @type</td><td class='rightAttributeTitle'>
549 Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
550 </td></tr></table>
551 <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>
552 <br /><table class='attributeTitle' summary="includeLower"><tr><td class='leftAttributeTitle'>
553 @includeLower</td><td class='rightAttributeTitle'>
554 Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
555 </td></tr></table>
556 <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>
557 <br /><table class='attributeTitle' summary="includeUpper"><tr><td class='leftAttributeTitle'>
558 @includeUpper</td><td class='rightAttributeTitle'>
559 Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
560 </td></tr></table>
561 <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>
562 <br /><table class='attributeTitle' summary="precisionStep"><tr><td class='leftAttributeTitle'>
563 @precisionStep</td><td class='rightAttributeTitle'>
564 Attribute of <a href='#NumericRangeFilter'>NumericRangeFilter</a>
565 </td></tr></table>
566 <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>
567 <br /><table class='elementTitle' summary="SpanTerm"><tr><td class='leftElementTitle'>
568 &lt;SpanTerm&gt;</td><td class='rightElementTitle'>
569 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>
570 </td></tr></table>
571 <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>
572 </p><pre>
573               &lt;SpanNear slop="8" inOrder="false" fieldName="text"&gt;                
574                         &lt;SpanOr&gt;
575                                 &lt;SpanTerm&gt;killed&lt;/SpanTerm&gt;
576                                 &lt;SpanTerm&gt;died&lt;/SpanTerm&gt;
577                                 &lt;SpanTerm&gt;dead&lt;/SpanTerm&gt;
578                         &lt;/SpanOr&gt;
579                         &lt;SpanOr&gt;
580                                 &lt;SpanTerm&gt;miner&lt;/SpanTerm&gt;
581                                 &lt;SpanTerm&gt;mining&lt;/SpanTerm&gt;
582                                 &lt;SpanTerm&gt;miners&lt;/SpanTerm&gt;
583                         &lt;/SpanOr&gt;
584               &lt;/SpanNear&gt;
585               </pre><p></p><blockquote><table summary='element info'><tr>
586 <td class='construct'><table  summary="&lt;SpanTerm&gt;'s attributes"><tr>
587 <th class='title' colspan='3'>&lt;SpanTerm&gt;'s attributes</th>
588 </tr>
589 <tr><th colspan='3' height='1' class='ruler'></th></tr>
590 <tr>
591 <th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
592 <tr><th colspan='3' height='1' class='ruler'></th></tr>
593 <tr><td><a href='#SpanTerm_fieldName'>fieldName</a></td><td></td><td></td></tr></table></td></tr></table></blockquote>
594 <a name='SpanTerm_fieldName'></a>
595 <br /><table class='attributeTitle' summary="fieldName"><tr><td class='leftAttributeTitle'>
596 @fieldName</td><td class='rightAttributeTitle'>
597 Attribute of <a href='#SpanTerm'>SpanTerm</a>
598 </td></tr></table>
599 <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>
600 <br /><table class='elementTitle' summary="SpanOrTerms"><tr><td class='leftElementTitle'>
601 &lt;SpanOrTerms&gt;</td><td class='rightElementTitle'>
602 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>
603 </td></tr></table>
604 <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
605 using words describing a fatality near to references to miners</em>
606 </p><pre>
607               &lt;SpanNear slop="8" inOrder="false" fieldName="text"&gt;                
608                         &lt;SpanOrTerms&gt;killed died death dead deaths&lt;/SpanOrTerms&gt;
609                         &lt;SpanOrTerms&gt;miner mining miners&lt;/SpanOrTerms&gt;
610               &lt;/SpanNear&gt;
611               </pre><p></p><blockquote><table summary='element info'><tr>
612 <td class='construct'><table  summary="&lt;SpanOrTerms&gt;'s attributes"><tr>
613 <th class='title' colspan='3'>&lt;SpanOrTerms&gt;'s attributes</th>
614 </tr>
615 <tr><th colspan='3' height='1' class='ruler'></th></tr>
616 <tr>
617 <th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
618 <tr><th colspan='3' height='1' class='ruler'></th></tr>
619 <tr><td><a href='#SpanOrTerms_fieldName'>fieldName</a></td><td></td><td></td></tr></table></td></tr></table></blockquote>
620 <a name='SpanOrTerms_fieldName'></a>
621 <br /><table class='attributeTitle' summary="fieldName"><tr><td class='leftAttributeTitle'>
622 @fieldName</td><td class='rightAttributeTitle'>
623 Attribute of <a href='#SpanOrTerms'>SpanOrTerms</a>
624 </td></tr></table>
625 <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>
626 <br /><table class='elementTitle' summary="SpanOr"><tr><td class='leftElementTitle'>
627 &lt;SpanOr&gt;</td><td class='rightElementTitle'>
628 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>
629 </td></tr></table>
630 <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>
631 </p><pre>
632               &lt;SpanNear slop="8" inOrder="false" fieldName="text"&gt;                
633                         &lt;SpanOr&gt;
634                                 &lt;SpanTerm&gt;killed&lt;/SpanTerm&gt;
635                                 &lt;SpanTerm&gt;died&lt;/SpanTerm&gt;
636                                 &lt;SpanTerm&gt;dead&lt;/SpanTerm&gt;
637                         &lt;/SpanOr&gt;
638                         &lt;SpanOr&gt;
639                                 &lt;SpanTerm&gt;miner&lt;/SpanTerm&gt;
640                                 &lt;SpanTerm&gt;mining&lt;/SpanTerm&gt;
641                                 &lt;SpanTerm&gt;miners&lt;/SpanTerm&gt;
642                         &lt;/SpanOr&gt;
643               &lt;/SpanNear&gt;
644               </pre><p></p><blockquote><table summary='element info'><tr>
645 <td class='construct'><table summary="&lt;SpanOr&gt;'s children">
646 <thead>
647 <tr><th class='title' colspan='2'>&lt;SpanOr&gt;'s children</th></tr>
648 <tr><th colspan='2' height='1' class='ruler'></th></tr>
649 <tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
650 <tr><th colspan='2' height='1' class='ruler'></th></tr>
651 </thead>
652 <tbody><tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>Any number</td></tr>
653 <tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>Any number</td></tr>
654 <tr><td><a href='#SpanNear'>SpanNear</a></td><td>Any number</td></tr>
655 <tr><td><a href='#SpanNot'>SpanNot</a></td><td>Any number</td></tr>
656 <tr><td><a href='#SpanOr'>SpanOr</a></td><td>Any number</td></tr>
657 <tr><td><a href='#SpanOrTerms'>SpanOrTerms</a></td><td>Any number</td></tr>
658 <tr><td><a href='#SpanTerm'>SpanTerm</a></td><td>Any number</td></tr>
659 </tbody></table></td></tr></table></blockquote>
660 <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>
661 <br /><table class='elementTitle' summary="SpanNear"><tr><td class='leftElementTitle'>
662 &lt;SpanNear&gt;</td><td class='rightElementTitle'>
663 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>
664 </td></tr></table>
665 <p>Takes any number of child queries from the Span family and tests for proximity</p><blockquote><table summary='element info'><tr>
666 <td class='construct'><table summary="&lt;SpanNear&gt;'s children">
667 <thead>
668 <tr><th class='title' colspan='2'>&lt;SpanNear&gt;'s children</th></tr>
669 <tr><th colspan='2' height='1' class='ruler'></th></tr>
670 <tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
671 <tr><th colspan='2' height='1' class='ruler'></th></tr>
672 </thead>
673 <tbody><tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>Any number</td></tr>
674 <tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>Any number</td></tr>
675 <tr><td><a href='#SpanNear'>SpanNear</a></td><td>Any number</td></tr>
676 <tr><td><a href='#SpanNot'>SpanNot</a></td><td>Any number</td></tr>
677 <tr><td><a href='#SpanOr'>SpanOr</a></td><td>Any number</td></tr>
678 <tr><td><a href='#SpanOrTerms'>SpanOrTerms</a></td><td>Any number</td></tr>
679 <tr><td><a href='#SpanTerm'>SpanTerm</a></td><td>Any number</td></tr>
680 </tbody></table></td><td class='construct'><table  summary="&lt;SpanNear&gt;'s attributes"><tr>
681 <th class='title' colspan='3'>&lt;SpanNear&gt;'s attributes</th>
682 </tr>
683 <tr><th colspan='3' height='1' class='ruler'></th></tr>
684 <tr>
685 <th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
686 <tr><th colspan='3' height='1' class='ruler'></th></tr>
687 <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>
688 <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>
689 <br /><table class='attributeTitle' summary="slop"><tr><td class='leftAttributeTitle'>
690 @slop</td><td class='rightAttributeTitle'>
691 Attribute of <a href='#SpanNear'>SpanNear</a>
692 </td></tr></table>
693 <p>defines the maximum distance between Span elements where distance is expressed as word number, not byte offset</p><p><span class='inTextTitle'>Example:</span> <em>Find documents using terms within 8 words of each other talking about mining and accidents</em>
694 </p><pre>
695               &lt;SpanNear slop="8" inOrder="false" fieldName="text"&gt;                
696                         &lt;SpanOr&gt;
697                                 &lt;SpanTerm&gt;killed&lt;/SpanTerm&gt;
698                                 &lt;SpanTerm&gt;died&lt;/SpanTerm&gt;
699                                 &lt;SpanTerm&gt;dead&lt;/SpanTerm&gt;
700                         &lt;/SpanOr&gt;
701                         &lt;SpanOr&gt;
702                                 &lt;SpanTerm&gt;miner&lt;/SpanTerm&gt;
703                                 &lt;SpanTerm&gt;mining&lt;/SpanTerm&gt;
704                                 &lt;SpanTerm&gt;miners&lt;/SpanTerm&gt;
705                         &lt;/SpanOr&gt;
706               &lt;/SpanNear&gt;
707               </pre><p></p><p><span class='inTextTitle'>Required</span></p><a name='SpanNear_inOrder'></a>
708 <br /><table class='attributeTitle' summary="inOrder"><tr><td class='leftAttributeTitle'>
709 @inOrder</td><td class='rightAttributeTitle'>
710 Attribute of <a href='#SpanNear'>SpanNear</a>
711 </td></tr></table>
712 <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>
713 <br /><table class='elementTitle' summary="SpanFirst"><tr><td class='leftElementTitle'>
714 &lt;SpanFirst&gt;</td><td class='rightElementTitle'>
715 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>
716 </td></tr></table>
717 <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>
718 </p><pre>                 
719                  &lt;SpanFirst end="50"&gt;
720                        &lt;SpanOrTerms fieldName="text"&gt;resigning resign leave&lt;/SpanOrTerms&gt;
721                  &lt;/SpanFirst&gt;
722                  </pre><p></p><blockquote><table summary='element info'><tr>
723 <td class='construct'><table summary="&lt;SpanFirst&gt;'s children">
724 <thead>
725 <tr><th class='title' colspan='2'>&lt;SpanFirst&gt;'s children</th></tr>
726 <tr><th colspan='2' height='1' class='ruler'></th></tr>
727 <tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
728 <tr><th colspan='2' height='1' class='ruler'></th></tr>
729 </thead>
730 <tbody><tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
731 <tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
732 <tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
733 <tr><td><a href='#SpanNot'>SpanNot</a></td><td>One or none</td></tr>
734 <tr><td><a href='#SpanOr'>SpanOr</a></td><td>One or none</td></tr>
735 <tr><td><a href='#SpanOrTerms'>SpanOrTerms</a></td><td>One or none</td></tr>
736 <tr><td><a href='#SpanTerm'>SpanTerm</a></td><td>One or none</td></tr>
737 </tbody></table></td><td class='construct'><table  summary="&lt;SpanFirst&gt;'s attributes"><tr>
738 <th class='title' colspan='3'>&lt;SpanFirst&gt;'s attributes</th>
739 </tr>
740 <tr><th colspan='3' height='1' class='ruler'></th></tr>
741 <tr>
742 <th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
743 <tr><th colspan='3' height='1' class='ruler'></th></tr>
744 <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>
745 <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>
746 <br /><table class='attributeTitle' summary="end"><tr><td class='leftAttributeTitle'>
747 @end</td><td class='rightAttributeTitle'>
748 Attribute of <a href='#SpanFirst'>SpanFirst</a>
749 </td></tr></table>
750 <p>Controls the end of the region considered in a document's field (expressed in word number, not byte offset)</p><p><span class='inTextTitle'>Required</span></p><a name='SpanFirst_boost'></a>
751 <br /><table class='attributeTitle' summary="boost"><tr><td class='leftAttributeTitle'>
752 @boost</td><td class='rightAttributeTitle'>
753 Attribute of <a href='#SpanFirst'>SpanFirst</a>
754 </td></tr></table>
755 <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>
756 <br /><table class='elementTitle' summary="SpanNot"><tr><td class='leftElementTitle'>
757 &lt;SpanNot&gt;</td><td class='rightElementTitle'>
758 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>
759 </td></tr></table>
760 <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>
761 </p><pre>
762           &lt;SpanNot fieldName="text"&gt;
763              &lt;Include&gt;
764                 &lt;SpanNear slop="2" inOrder="true"&gt;                
765                      &lt;SpanTerm&gt;social&lt;/SpanTerm&gt;
766                      &lt;SpanTerm&gt;services&lt;/SpanTerm&gt;
767                 &lt;/SpanNear&gt;                               
768              &lt;/Include&gt;
769              &lt;Exclude&gt;
770                 &lt;SpanTerm&gt;public&lt;/SpanTerm&gt;
771              &lt;/Exclude&gt;
772           &lt;/SpanNot&gt;
773               </pre><p></p><blockquote><table summary='element info'><tr>
774 <td class='construct'><table summary="&lt;SpanNot&gt;'s children">
775 <thead>
776 <tr><th class='title' colspan='2'>&lt;SpanNot&gt;'s children</th></tr>
777 <tr><th colspan='2' height='1' class='ruler'></th></tr>
778 <tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
779 <tr><th colspan='2' height='1' class='ruler'></th></tr>
780 </thead>
781 <tbody><tr><td><a href='#Exclude'>Exclude</a></td><td>Only one</td></tr>
782 <tr><td><a href='#Include'>Include</a></td><td>Only one</td></tr>
783 </tbody></table></td></tr></table></blockquote>
784 <span class='inTextTitle'>Element's model:</span><p class='model'>(<a href='#Include'>Include</a>, <a href='#Exclude'>Exclude</a>)</p><a name='Include'></a>
785 <br /><table class='elementTitle' summary="Include"><tr><td class='leftElementTitle'>
786 &lt;Include&gt;</td><td class='rightElementTitle'>
787 Child of <a href='#SpanNot'>SpanNot</a>
788 </td></tr></table>
789 <p>The SpanQuery to find</p><blockquote><table summary='element info'><tr>
790 <td class='construct'><table summary="&lt;Include&gt;'s children">
791 <thead>
792 <tr><th class='title' colspan='2'>&lt;Include&gt;'s children</th></tr>
793 <tr><th colspan='2' height='1' class='ruler'></th></tr>
794 <tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
795 <tr><th colspan='2' height='1' class='ruler'></th></tr>
796 </thead>
797 <tbody><tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
798 <tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
799 <tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
800 <tr><td><a href='#SpanNot'>SpanNot</a></td><td>One or none</td></tr>
801 <tr><td><a href='#SpanOr'>SpanOr</a></td><td>One or none</td></tr>
802 <tr><td><a href='#SpanOrTerms'>SpanOrTerms</a></td><td>One or none</td></tr>
803 <tr><td><a href='#SpanTerm'>SpanTerm</a></td><td>One or none</td></tr>
804 </tbody></table></td></tr></table></blockquote>
805 <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>
806 <br /><table class='elementTitle' summary="Exclude"><tr><td class='leftElementTitle'>
807 &lt;Exclude&gt;</td><td class='rightElementTitle'>
808 Child of <a href='#SpanNot'>SpanNot</a>
809 </td></tr></table>
810 <p>The SpanQuery to be avoided</p><blockquote><table summary='element info'><tr>
811 <td class='construct'><table summary="&lt;Exclude&gt;'s children">
812 <thead>
813 <tr><th class='title' colspan='2'>&lt;Exclude&gt;'s children</th></tr>
814 <tr><th colspan='2' height='1' class='ruler'></th></tr>
815 <tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
816 <tr><th colspan='2' height='1' class='ruler'></th></tr>
817 </thead>
818 <tbody><tr><td><a href='#BoostingTermQuery'>BoostingTermQuery</a></td><td>One or none</td></tr>
819 <tr><td><a href='#SpanFirst'>SpanFirst</a></td><td>One or none</td></tr>
820 <tr><td><a href='#SpanNear'>SpanNear</a></td><td>One or none</td></tr>
821 <tr><td><a href='#SpanNot'>SpanNot</a></td><td>One or none</td></tr>
822 <tr><td><a href='#SpanOr'>SpanOr</a></td><td>One or none</td></tr>
823 <tr><td><a href='#SpanOrTerms'>SpanOrTerms</a></td><td>One or none</td></tr>
824 <tr><td><a href='#SpanTerm'>SpanTerm</a></td><td>One or none</td></tr>
825 </tbody></table></td></tr></table></blockquote>
826 <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>
827 <br /><table class='elementTitle' summary="ConstantScoreQuery"><tr><td class='leftElementTitle'>
828 &lt;ConstantScoreQuery&gt;</td><td class='rightElementTitle'>
829 Child of <a href='#Clause'>Clause</a>, <a href='#Query'>Query</a>, <a href='#CachedFilter'>CachedFilter</a>
830 </td></tr></table>
831 <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>
832 </p><pre>
833      &lt;ConstantScoreQuery&gt;
834            &lt;RangeFilter fieldName="date" lowerTerm="19970101" upperTerm="20070101"/&gt;
835      &lt;/ConstantScoreQuery&gt;        
836         </pre><p></p><blockquote><table summary='element info'><tr>
837 <td class='construct'><table summary="&lt;ConstantScoreQuery&gt;'s children">
838 <thead>
839 <tr><th class='title' colspan='2'>&lt;ConstantScoreQuery&gt;'s children</th></tr>
840 <tr><th colspan='2' height='1' class='ruler'></th></tr>
841 <tr><th class='subtitle'>Name</th><th class='subtitle'>Cardinality</th></tr>
842 <tr><th colspan='2' height='1' class='ruler'></th></tr>
843 </thead>
844 <tbody><tr><td><a href='#CachedFilter'>CachedFilter</a></td><td>Any number</td></tr>
845 <tr><td><a href='#NumericRangeFilter'>NumericRangeFilter</a></td><td>Any number</td></tr>
846 <tr><td><a href='#RangeFilter'>RangeFilter</a></td><td>Any number</td></tr>
847 </tbody></table></td><td class='construct'><table  summary="&lt;ConstantScoreQuery&gt;'s attributes"><tr>
848 <th class='title' colspan='3'>&lt;ConstantScoreQuery&gt;'s attributes</th>
849 </tr>
850 <tr><th colspan='3' height='1' class='ruler'></th></tr>
851 <tr>
852 <th class='subtitle'>Name</th><th class='subtitle'>Values</th><th class='subtitle'>Default</th></tr>
853 <tr><th colspan='3' height='1' class='ruler'></th></tr>
854 <tr><td><a href='#ConstantScoreQuery_boost'>boost</a></td><td></td><td>1.0</td></tr></table></td></tr></table></blockquote>
855 <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>
856 <br /><table class='attributeTitle' summary="boost"><tr><td class='leftAttributeTitle'>
857 @boost</td><td class='rightAttributeTitle'>
858 Attribute of <a href='#ConstantScoreQuery'>ConstantScoreQuery</a>
859 </td></tr></table>
860 <p>Optional boost for matches on this query. Values > 1</p><p><span class='inTextTitle'>Default value</span>: 1.0</p></body></html>