diff lucene/src/luan/modules/lucene/Versioning.luan @ 629:35dde32c02ab 0.15

change String.matches()
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 18 Jan 2016 23:07:52 -0700
parents 22bfd8a2eaee
children ca169567ce07
line wrap: on
line diff
--- a/lucene/src/luan/modules/lucene/Versioning.luan	Mon Jan 18 06:42:50 2016 -0700
+++ b/lucene/src/luan/modules/lucene/Versioning.luan	Mon Jan 18 23:07:52 2016 -0700
@@ -39,7 +39,7 @@
 	db.advanced_search( Lucene.literal"id index" .. ":*", function(_,doc_fn)
 		local doc = doc_fn()
 		for field, value in pairs(copy(doc)) do
-			if matches(field,".* index") then
+			if matches(field," index$") then
 				local new_field = sub(field,1,-7)
 				db.indexed_fields[new_field] or error("field '"..new_field.."' not indexed")
 				doc[new_field] = value