Mercurial Hosting > luan
comparison lucene/src/luan/modules/lucene/LuceneIndex.java @ 411:23b99a5039b5
remove Luan.newTable()
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 29 Apr 2015 16:05:02 -0600 |
parents | d34be4588556 |
children | 23a93c118042 |
comparison
equal
deleted
inserted
replaced
410:0d6098a29b3e | 411:23b99a5039b5 |
---|---|
129 | 129 |
130 synchronized String nextId(LuanState luan) throws LuanException, IOException { | 130 synchronized String nextId(LuanState luan) throws LuanException, IOException { |
131 String rtn = Long.toString(++id); | 131 String rtn = Long.toString(++id); |
132 if( id > idLim ) { | 132 if( id > idLim ) { |
133 idLim += idBatch; | 133 idLim += idBatch; |
134 LuanTable doc = Luan.newTable(); | 134 LuanTable doc = new LuanTable(); |
135 doc.put( "type", "next_id" ); | 135 doc.put( "type", "next_id" ); |
136 doc.put( FLD_NEXT_ID, idLim ); | 136 doc.put( FLD_NEXT_ID, idLim ); |
137 writer.updateDocument(newTerm("type","next_id"),toLucene(luan,doc)); | 137 writer.updateDocument(newTerm("type","next_id"),toLucene(luan,doc)); |
138 } | 138 } |
139 return rtn; | 139 return rtn; |