add --shared
[pylucene.git] / lucene-java-3.4.0 / lucene / contrib / xml-query-parser / src / test / org / apache / lucene / xmlparser / TermsFilterQuery.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <FilteredQuery>
3         <Query>
4                 <BooleanQuery fieldName="contents">
5                         <Clause occurs="should">
6                                 <TermQuery>merger</TermQuery>
7                         </Clause>
8                         <Clause occurs="must">
9                                 <TermQuery>bank</TermQuery> 
10                         </Clause>
11                 </BooleanQuery> 
12         </Query>
13         <Filter>
14                 <!-- TermsFilter uses an analyzer to tokenize Field text and creates a filter for docs which 
15                         have ANY of the supplied terms. Unlike a RangeFilter this can be used for filtering on 
16                         multiple terms that are not necessarily in a sequence. An example might be a list of primary
17                         keys from a database query result or perhaps a choice of "category" labels picked by the end 
18                         user.
19                         As a filter, this is much faster than the equivalent query (a BooleanQuery with many 
20                         "should" TermQueries)
21                         
22                         This example might be just a list of Saturdays ie not a contiguous range of values
23                         which can be handled by rangefilter
24                 -->
25                 <TermsFilter fieldName="date">                  
26                         19870601 19870608 19870615
27                 </TermsFilter> 
28         </Filter>
29         
30 </FilteredQuery>