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