diff src/luan/modules/lucene/queryparser/StringFieldParser.java @ 1110:38a42f437fd2

queryparser now uses parsers.Parser
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 02 Aug 2017 13:45:06 -0600
parents 1a68fc55a80c
children 88b5b81cad4a
line wrap: on
line diff
--- a/src/luan/modules/lucene/queryparser/StringFieldParser.java	Wed Aug 02 12:36:28 2017 -0600
+++ b/src/luan/modules/lucene/queryparser/StringFieldParser.java	Wed Aug 02 13:45:06 2017 -0600
@@ -14,6 +14,7 @@
 import org.apache.lucene.search.PrefixQuery;
 import org.apache.lucene.search.SortField;
 import org.apache.lucene.index.Term;
+import luan.modules.parsers.ParseException;
 
 
 public class StringFieldParser implements FieldParser {
@@ -75,7 +76,7 @@
 			char c = a[i];
 			if( c == '\\' ) {
 				if( ++i == a.length )
-					throw new ParseException(qp,"ends with '\\'");
+					throw qp.exception("ends with '\\'");
 				c = a[i];
 			}
 			sb.append(c);
@@ -95,7 +96,7 @@
 				hasWildcard = true;
 			if( c == '\\' ) {
 				if( ++i == a.length )
-					throw new ParseException(qp,"ends with '\\'");
+					throw qp.exception("ends with '\\'");
 				c = a[i];
 				if( c=='?' || c=='*' )
 					sb.append('\\');