diff src/goodjava/lucene/queryparser/StringFieldParser.java @ 1459:b04b8fc5f4f4

GoodQueryParser
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 20 Mar 2020 11:06:53 -0600
parents 6b6c11c9164e
children 83caee2ed4ad
line wrap: on
line diff
--- a/src/goodjava/lucene/queryparser/StringFieldParser.java	Fri Mar 20 10:58:53 2020 -0600
+++ b/src/goodjava/lucene/queryparser/StringFieldParser.java	Fri Mar 20 11:06:53 2020 -0600
@@ -25,7 +25,7 @@
 		this.analyzer = analyzer;
 	}
 
-	@Override public Query getQuery(SaneQueryParser qp,String field,String query) throws ParseException {
+	@Override public Query getQuery(GoodQueryParser qp,String field,String query) throws ParseException {
 		String wildcard = wildcard(qp,query);
 		if( wildcard != null )
 			return new WildcardQuery(new Term(field,wildcard));
@@ -54,13 +54,13 @@
 		return pq;
 	}
 
-	@Override public Query getRangeQuery(SaneQueryParser qp,String field,String minQuery,String maxQuery,boolean includeMin,boolean includeMax) throws ParseException {
+	@Override public Query getRangeQuery(GoodQueryParser qp,String field,String minQuery,String maxQuery,boolean includeMin,boolean includeMax) throws ParseException {
 		minQuery = minQuery.equals("*") ? null : escape(qp,minQuery);
 		maxQuery = maxQuery.equals("*") ? null : escape(qp,maxQuery);
 		return TermRangeQuery.newStringRange(field,minQuery,maxQuery,includeMin,includeMax);
 	}
 
-	static String escape(SaneQueryParser qp,String s) throws ParseException {
+	static String escape(GoodQueryParser qp,String s) throws ParseException {
 		final char[] a = s.toCharArray();
 		int i, n;
 		if( a[0] == '"' ) {
@@ -84,7 +84,7 @@
 		return sb.toString();
 	}
 
-	private static String wildcard(SaneQueryParser qp,String s) throws ParseException {
+	private static String wildcard(GoodQueryParser qp,String s) throws ParseException {
 		final char[] a = s.toCharArray();
 		if( a[0] == '"' )
 			return null;
@@ -106,7 +106,7 @@
 		return hasWildcard ? sb.toString() : null;
 	}
 
-	@Override public SortField getSortField(SaneQueryParser qp,String field,boolean reverse) {
+	@Override public SortField getSortField(GoodQueryParser qp,String field,boolean reverse) {
 		return new SortField( field, SortField.Type.STRING, reverse );
 	}