mirror of
https://github.com/netfun2000/ip2region.git
synced 2026-02-27 09:44:31 +08:00
err checking the searcher create
This commit is contained in:
@@ -59,7 +59,11 @@ end
|
||||
-- create the searcher based on the cache-policy
|
||||
local searcher, v_index, content
|
||||
if cachePolicy == "file" then
|
||||
searcher = xdb.new_with_file_only(dbFile)
|
||||
searcher, err = xdb.new_with_file_only(dbFile)
|
||||
if err ~= nil then
|
||||
print(string.format("failed to create searcher: %s", err))
|
||||
return
|
||||
end
|
||||
elseif cachePolicy == "vectorIndex" then
|
||||
v_index = xdb.load_vector_index(dbFile)
|
||||
if v_index == nil then
|
||||
|
||||
Reference in New Issue
Block a user