Fixed #52.
h3rald h3rald@h3rald.com
Mon, 30 Sep 2019 14:09:08 +0200
1 files changed,
5 insertions(+),
0 deletions(-)
jump to
M
src/litestorepkg/lib/utils.nim
→
src/litestorepkg/lib/utils.nim
@@ -85,9 +85,14 @@ result = result & " FROM " & tables.join(", ") & " JOIN (" & innerSelect & ") as ranktable USING(docid) JOIN searchdata USING(docid) "
result = result & "WHERE 1=1 " else: tables = options.tables & @["searchdata"] + if options.jsonFilter != "": + options.select[0] = "COUNT(documents.docid)" + tables = tables & @["documents"] result = result & options.select.join(", ") result = result & " FROM "&tables.join(", ")&" " result = result & "WHERE 1=1 " + if options.jsonFilter != "": + result = result & "AND documents.id = searchdata.id " options.orderby = "" else: tables = options.tables & @["documents"]