diff src/goodjava/lucene/api/LuceneUtils.java @ 1461:e5d48b85351c

start lucene.logging
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 28 Mar 2020 21:30:42 -0600
parents 3ab0d043370f
children c62324841dfb
line wrap: on
line diff
--- a/src/goodjava/lucene/api/LuceneUtils.java	Mon Mar 23 00:04:42 2020 -0600
+++ b/src/goodjava/lucene/api/LuceneUtils.java	Sat Mar 28 21:30:42 2020 -0600
@@ -59,6 +59,10 @@
 			BytesRef br = new BytesRef();
 			NumericUtils.longToPrefixCoded((Long)value,0,br);
 			return new Term(name,br);
+		} else if( value instanceof Integer ) {
+			BytesRef br = new BytesRef();
+			NumericUtils.intToPrefixCoded((Integer)value,0,br);
+			return new Term(name,br);
 		} else
 			throw new RuntimeException("invalid value type "+value.getClass()+"' for term '"+name+"'");
 	}