mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-01 18:19:08 +00:00
fix: Session events merge logic
This commit is contained in:
parent
789b483d06
commit
dea94bf5c2
1 changed files with 3 additions and 3 deletions
|
@ -205,10 +205,10 @@ def get_precision_search_response(data: PrecisionQuery, response_model=Precision
|
|||
docsDict = {}
|
||||
|
||||
for d in graphdocs:
|
||||
if d['d']['BrowsingSessionId'] not in docsDict:
|
||||
docsDict[d['d']['BrowsingSessionId']] = d['d']
|
||||
if d['d']['VisitedWebPageVisitDurationInMilliseconds'] not in docsDict:
|
||||
docsDict[d['d']['VisitedWebPageVisitDurationInMilliseconds']] = d['d']
|
||||
else:
|
||||
docsDict[d['d']['BrowsingSessionId']]['text'] += d['d']['text']
|
||||
docsDict[d['d']['VisitedWebPageVisitDurationInMilliseconds']]['text'] += d['d']['text']
|
||||
|
||||
docs = []
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue