lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mharw...@apache.org
Subject svn commit: r388296 - in /lucene/java/trunk/contrib/xml-query-parser/src: java/org/apache/lucene/xmlparser/CoreParser.java test/org/apache/lucene/xmlparser/MatchAllDocsQuery.xml test/org/apache/lucene/xmlparser/TestParser.java
Date Thu, 23 Mar 2006 23:30:33 GMT
Author: mharwood
Date: Thu Mar 23 15:30:33 2006
New Revision: 388296

URL: http://svn.apache.org/viewcvs?rev=388296&view=rev
Log:
Added support for MatchAllDocs

Added:
    lucene/java/trunk/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/MatchAllDocsQuery.xml
Modified:
    lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/CoreParser.java
    lucene/java/trunk/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestParser.java

Modified: lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/CoreParser.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/CoreParser.java?rev=388296&r1=388295&r2=388296&view=diff
==============================================================================
--- lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/CoreParser.java
(original)
+++ lucene/java/trunk/contrib/xml-query-parser/src/java/org/apache/lucene/xmlparser/CoreParser.java
Thu Mar 23 15:30:33 2006
@@ -11,6 +11,7 @@
 import org.apache.lucene.xmlparser.builders.BooleanQueryBuilder;
 import org.apache.lucene.xmlparser.builders.ConstantScoreQueryBuilder;
 import org.apache.lucene.xmlparser.builders.FilteredQueryBuilder;
+import org.apache.lucene.xmlparser.builders.MatchAllDocsQueryBuilder;
 import org.apache.lucene.xmlparser.builders.RangeFilterBuilder;
 import org.apache.lucene.xmlparser.builders.SpanFirstBuilder;
 import org.apache.lucene.xmlparser.builders.SpanNearBuilder;
@@ -47,6 +48,7 @@
 		
 		queryFactory = new QueryBuilderFactory();
 		queryFactory.addBuilder("TermQuery",new TermQueryBuilder());
+		queryFactory.addBuilder("MatchAllDocsQuery",new MatchAllDocsQueryBuilder());
 		queryFactory.addBuilder("BooleanQuery",new BooleanQueryBuilder(queryFactory));
 		queryFactory.addBuilder("UserQuery",new UserInputQueryBuilder(parser));
 		queryFactory.addBuilder("FilteredQuery",new FilteredQueryBuilder(filterFactory,queryFactory));

Added: lucene/java/trunk/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/MatchAllDocsQuery.xml
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/MatchAllDocsQuery.xml?rev=388296&view=auto
==============================================================================
--- lucene/java/trunk/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/MatchAllDocsQuery.xml
(added)
+++ lucene/java/trunk/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/MatchAllDocsQuery.xml
Thu Mar 23 15:30:33 2006
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<FilteredQuery>
+	<Query>
+		<MatchAllDocsQuery/>
+	</Query>
+	
+	<Filter>
+		<RangeFilter fieldName="date" lowerTerm="19870409" upperTerm="19870412"/>
+	</Filter>
+	
+</FilteredQuery>

Modified: lucene/java/trunk/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestParser.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestParser.java?rev=388296&r1=388295&r2=388296&view=diff
==============================================================================
--- lucene/java/trunk/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestParser.java
(original)
+++ lucene/java/trunk/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/TestParser.java
Thu Mar 23 15:30:33 2006
@@ -135,6 +135,11 @@
 			Query q=parse("ConstantScoreQuery.xml");
 			dumpResults("ConstantScoreQuery",q, 5);
 	}
+	public void testMatchAllDocsPlusFilterXML() throws ParserException, IOException
+	{
+			Query q=parse("MatchAllDocsQuery.xml");
+			dumpResults("MatchAllDocsQuery with range filter", q, 5);
+	}
 	
 
 



Mime
View raw message