diff lucene/src/luan/modules/lucene/LuceneWriter.java @ 426:23a93c118042

fix LuanTable.get() to use metatables
author Franklin Schmidt <fschmidt@gmail.com>
date Fri, 01 May 2015 18:44:20 -0600
parents 23b99a5039b5
children dae264ad6a7b
line wrap: on
line diff
--- a/lucene/src/luan/modules/lucene/LuceneWriter.java	Fri May 01 17:18:23 2015 -0600
+++ b/lucene/src/luan/modules/lucene/LuceneWriter.java	Fri May 01 18:44:20 2015 -0600
@@ -58,9 +58,9 @@
 	}
 
 	public void save_document(LuanState luan,LuanTable doc) throws LuanException, IOException {
-		if( doc.get("type")==null )
+		if( doc.get(luan,"type")==null )
 			throw luan.exception("missing 'type' field");
-		String id = (String)doc.get("id");
+		String id = (String)doc.get(luan,"id");
 		if( id == null ) {
 			id = nextId(luan);
 			doc.put("id",id);