changeset 617:e54c1646eed0

add Lucene.next_id()
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 30 Dec 2015 02:15:01 -0700
parents 56b0b9018319
children 5e495e4e560b
files lucene/src/luan/modules/lucene/Lucene.luan lucene/src/luan/modules/lucene/LuceneIndex.java
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lucene/src/luan/modules/lucene/Lucene.luan	Tue Dec 29 22:19:11 2015 -0700
+++ b/lucene/src/luan/modules/lucene/Lucene.luan	Wed Dec 30 02:15:01 2015 -0700
@@ -37,6 +37,7 @@
 	index.update_in_transaction = java_index.update_in_transaction
 	index.close = java_index.close
 	index.ensure_open = java_index.ensure_open
+	index.next_id = java_index.nextId
 
 	function index.search(query, from, to, sort)
 		local results = {}
--- a/lucene/src/luan/modules/lucene/LuceneIndex.java	Tue Dec 29 22:19:11 2015 -0700
+++ b/lucene/src/luan/modules/lucene/LuceneIndex.java	Wed Dec 30 02:15:01 2015 -0700
@@ -210,7 +210,7 @@
 		}
 	}
 
-	private synchronized long nextId(LuanState luan) throws LuanException, IOException {
+	public synchronized long nextId(LuanState luan) throws LuanException, IOException {
 		if( ++id > idLim ) {
 			idLim += idBatch;
 			LuanTable doc = new LuanTable();