search by institutions adjusted
This commit is contained in:
@@ -531,7 +531,7 @@ def search_persons_by_institution(
|
||||
raise HTTPException(
|
||||
status_code=500, detail=f"Elasticsearch search failed: {str(e)}"
|
||||
)
|
||||
|
||||
total_found = response.get("hits",{}).get("total",{}).get("value",0)
|
||||
hits = response.get("hits", {}).get("hits", [])
|
||||
persons = [util.get_persons_data(hit) for hit in hits]
|
||||
return AuthorsListResponse(results=persons)
|
||||
return AuthorsListResponse(results=persons,meta=Meta(count=total_found,page=page_offset))
|
||||
|
||||
Reference in New Issue
Block a user