diff examples/blog/src/lib/Post.luan @ 1369:709f7498a363

change Lucene.index() and add Lucene.recover()
author Franklin Schmidt <fschmidt@gmail.com>
date Wed, 19 Jun 2019 00:26:10 -0600
parents 4721c482c86b
children bc40bc9aab3a
line wrap: on
line diff
--- a/examples/blog/src/lib/Post.luan	Tue Jun 18 21:56:53 2019 -0600
+++ b/examples/blog/src/lib/Post.luan	Wed Jun 19 00:26:10 2019 -0600
@@ -46,7 +46,7 @@
 end
 
 function Post.get_all()
-	local docs = db.search("type:post",1,1000,"id desc")
+	local docs = db.search("type:post",1,1000,{sort="id desc"})
 	local posts = {}
 	for _, doc in ipairs(docs) do
 		posts[#posts+1] = from_doc(doc)