pylucene 3.5.0-3
[pylucene.git] / lucene-java-3.5.0 / lucene / contrib / xml-query-parser / src / test / org / apache / lucene / xmlparser / NestedBooleanQuery.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3         This query was added to demonstrate nested boolean queries - there
4         was a bug in the XML parser which added ALL child <Clause> tags to 
5         the top level tags ie. took child and grandchild elements instead
6         of just child elements. This was due to the use of the 
7         Element.getElementsByTagName() call in BooleanQueryBuilder
8 -->     
9 <BooleanQuery fieldName="contents">     
10         <Clause occurs="should">
11                 <BooleanQuery fieldName="contents">
12                         <Clause occurs="must">
13                                 <TermQuery>doesNotExistButShouldBeOKBecauseOtherClauseExists</TermQuery>
14                         </Clause>
15                 </BooleanQuery>
16         </Clause>
17         <Clause occurs="should">
18                 <TermQuery>bank</TermQuery>
19         </Clause>
20 </BooleanQuery>