Mercurial Hosting > luan
diff lucene/src/luan/modules/lucene/Versioning.luan @ 565:22bfd8a2eaee
do Table documentation;
replace Table.clone and Table.sub_list with Table.copy;
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Sun, 05 Jul 2015 00:47:00 -0600 |
parents | f4dfe9c64c25 |
children | 35dde32c02ab |
line wrap: on
line diff
--- a/lucene/src/luan/modules/lucene/Versioning.luan Sat Jul 04 20:57:24 2015 -0600 +++ b/lucene/src/luan/modules/lucene/Versioning.luan Sun Jul 05 00:47:00 2015 -0600 @@ -9,7 +9,7 @@ local sub = String.sub or error() local string_to_number = String.to_number or error() local Table = require "luan:Table" -local clone = Table.clone or error() +local copy = Table.copy or error() local Lucene = require "luan:lucene/Lucene" require "luan:logging/init" local Logging = require "luan:logging/Logging" @@ -38,7 +38,7 @@ db.indexed_fields["id index"] = Lucene.type.string db.advanced_search( Lucene.literal"id index" .. ":*", function(_,doc_fn) local doc = doc_fn() - for field, value in pairs(clone(doc)) do + for field, value in pairs(copy(doc)) do if matches(field,".* index") then local new_field = sub(field,1,-7) db.indexed_fields[new_field] or error("field '"..new_field.."' not indexed")