comparison src/luan/modules/lucene/Lucene.luan @ 1348:af478a1bd23d

bug fix
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 25 Feb 2019 13:34:56 -0700
parents 6f8988830098
children 8d95711f6615
comparison
equal deleted inserted replaced
1347:643cf1c37723 1348:af478a1bd23d
96 return results, total_hits 96 return results, total_hits
97 end 97 end
98 98
99 function index.get_document(query) 99 function index.get_document(query)
100 local doc 100 local doc
101 local function fn(_,doc_fn) 101 local function fn(_,doc_fn,_)
102 doc = doc_fn() 102 doc = doc_fn()
103 end 103 end
104 local total_hits = index.advanced_search(query,fn,1) 104 local total_hits = index.advanced_search(query,fn,1)
105 total_hits <= 1 or error( "found " .. total_hits .. " documents" ) 105 total_hits <= 1 or error( "found " .. total_hits .. " documents" )
106 return doc 106 return doc