This commit is contained in:
parent
ec70549e48
commit
5492887a10
|
@ -287,7 +287,9 @@ async def load_shouts_feed(_, info, options):
|
||||||
async def load_shouts_search(_, _info, text, limit=50, offset=0):
|
async def load_shouts_search(_, _info, text, limit=50, offset=0):
|
||||||
if text and len(text) > 2:
|
if text and len(text) > 2:
|
||||||
results = await SearchService.search(text, limit, offset)
|
results = await SearchService.search(text, limit, offset)
|
||||||
results_dict = {[s["slug"]]: s for s in results} # { slug, title, score }
|
results_dict = {}
|
||||||
|
for r in results:
|
||||||
|
results_dict[r["slug"]] = r
|
||||||
q = (
|
q = (
|
||||||
select(Shout) # Add "score" column
|
select(Shout) # Add "score" column
|
||||||
.options(
|
.options(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user