Mercurial Hosting > luan
comparison 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 |
comparison
equal
deleted
inserted
replaced
1460:3ab0d043370f | 1461:e5d48b85351c |
---|---|
57 return new Term(name,(String)value); | 57 return new Term(name,(String)value); |
58 } else if( value instanceof Long ) { | 58 } else if( value instanceof Long ) { |
59 BytesRef br = new BytesRef(); | 59 BytesRef br = new BytesRef(); |
60 NumericUtils.longToPrefixCoded((Long)value,0,br); | 60 NumericUtils.longToPrefixCoded((Long)value,0,br); |
61 return new Term(name,br); | 61 return new Term(name,br); |
62 } else if( value instanceof Integer ) { | |
63 BytesRef br = new BytesRef(); | |
64 NumericUtils.intToPrefixCoded((Integer)value,0,br); | |
65 return new Term(name,br); | |
62 } else | 66 } else |
63 throw new RuntimeException("invalid value type "+value.getClass()+"' for term '"+name+"'"); | 67 throw new RuntimeException("invalid value type "+value.getClass()+"' for term '"+name+"'"); |
64 } | 68 } |
65 | 69 |
66 } | 70 } |