This commit is contained in:
parent
8e77a57bc1
commit
8cc9d0d4d3
|
@ -305,12 +305,11 @@ async def load_shouts_search(_, _info, text, limit=50, offset=0):
|
|||
shout_id = int(shout_id)
|
||||
scores[shout_id] = sr.get("score")
|
||||
hits_ids.append(shout_id)
|
||||
shouts = []
|
||||
with local_session() as session:
|
||||
shouts = session.execute(query_shouts())
|
||||
shouts = get_shouts_from_query(query_shouts())
|
||||
for shout in shouts:
|
||||
shout.score = scores[int(shout.id)]
|
||||
return shouts.unique()
|
||||
shouts.sort(key=lambda x: x.score, reverse=True)
|
||||
return shouts
|
||||
return []
|
||||
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ ignore_logs = [
|
|||
"aiohttp",
|
||||
"_client",
|
||||
"._make_request",
|
||||
"base._log_request_response"
|
||||
"base._log_request_response",
|
||||
]
|
||||
for lgr in ignore_logs:
|
||||
loggr = logging.getLogger(lgr)
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
import asyncio
|
||||
import json
|
||||
import os
|
||||
import logging
|
||||
import os
|
||||
|
||||
from opensearchpy import OpenSearch
|
||||
|
||||
from services.encoders import CustomJSONEncoder
|
||||
from services.rediscache import redis
|
||||
|
||||
|
||||
# Set redis logging level to suppress DEBUG messages
|
||||
logger = logging.getLogger("search")
|
||||
logger.setLevel(logging.WARNING)
|
||||
|
|
Loading…
Reference in New Issue
Block a user