Mercurial Hosting > luan
diff lucene/src/luan/modules/lucene/Lucene.luan @ 515:1b2e4c7dab85
fix lucene sort and improve Web_search
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Tue, 26 May 2015 02:05:22 -0600 |
parents | 92c3d22745b8 |
children | 8dcf9e12446b |
line wrap: on
line diff
--- a/lucene/src/luan/modules/lucene/Lucene.luan Mon May 25 22:19:18 2015 -0600 +++ b/lucene/src/luan/modules/lucene/Lucene.luan Tue May 26 02:05:22 2015 -0600 @@ -120,9 +120,10 @@ for _, f in ipairs(fields) do f.field or error "missing sort field" f.type or error "missing sort type" + local field = index.map_field_name(f.field) local type = SortField.Type.valueOf( f.type.upper() ) local reverse = f.reverse or false - a[#a+1] = SortField.new(f.field,type,reverse) + a[#a+1] = SortField.new(field,type,reverse) end return Sort.new(Table.unpack(a)) end