changeset 1433:5f038be65271

minor
author Franklin Schmidt <fschmidt@gmail.com>
date Tue, 24 Dec 2019 17:57:47 -0700
parents d7644b21b128
children 56fb5cd8228d
files src/goodjava/queryparser/NumberFieldParser.java
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/goodjava/queryparser/NumberFieldParser.java	Fri Dec 20 23:24:50 2019 -0700
+++ b/src/goodjava/queryparser/NumberFieldParser.java	Tue Dec 24 17:57:47 2019 -0700
@@ -3,12 +3,16 @@
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.NumericRangeQuery;
 import org.apache.lucene.search.SortField;
+import org.apache.lucene.search.PrefixQuery;
+import org.apache.lucene.index.Term;
 import goodjava.parser.ParseException;
 
 
 public abstract class NumberFieldParser implements FieldParser {
 
 	@Override public final Query getQuery(SaneQueryParser qp,String field,String query) throws ParseException {
+		if( query.equals("*") )
+			return new PrefixQuery(new Term(field,""));
 		return getRangeQuery(qp,field,query,query,true,true);
 	}