Set title if not set
This commit is contained in:
@@ -96,6 +96,7 @@ def search(q: str, count: int, page: int):
|
|||||||
d = dict(doc)
|
d = dict(doc)
|
||||||
d["snippets"] = query.getsnippets(doc, ctxwords=20)
|
d["snippets"] = query.getsnippets(doc, ctxwords=20)
|
||||||
d["fpath"] = d["url"][STRIP_CHARS:]
|
d["fpath"] = d["url"][STRIP_CHARS:]
|
||||||
|
d["title"] = d["title"] or d["filename"]
|
||||||
result["results"].append(d)
|
result["results"].append(d)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user