Mercurial Hosting > luan
comparison lucene/src/luan/modules/lucene/LuceneIndex.java @ 427:dae264ad6a7b
fix LuanTable.put() to use metatables
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 01 May 2015 19:29:07 -0600 |
parents | 23a93c118042 |
children | 8a217fe5b4f3 |
comparison
equal
deleted
inserted
replaced
426:23a93c118042 | 427:dae264ad6a7b |
---|---|
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 = new LuanTable(); | 134 LuanTable doc = new LuanTable(); |
135 doc.put( "type", "next_id" ); | 135 doc.rawPut( "type", "next_id" ); |
136 doc.put( FLD_NEXT_ID, idLim ); | 136 doc.rawPut( 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; |
140 } | 140 } |
141 | 141 |