1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

fix search title (#1122)

This commit is contained in:
Matthias Kretschmann 2022-02-17 21:38:40 +00:00 committed by GitHub
parent d2fb4db7c6
commit 5a4a30e0b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -20,7 +20,10 @@ interface SearchResponse {
_scroll_id?: string | undefined
_shards: ShardsResponse
hits: {
total: number
total: {
relation: string
value: number
}
max_score: number
hits: Array<{
_index: string

View File

@ -79,7 +79,7 @@ export function transformQueryResult(
result.results = (queryResult.hits.hits || []).map(
(hit) => hit._source as Asset
)
result.totalResults = queryResult.hits.total
result.totalResults = queryResult.hits.total.value
result.totalPages =
result.totalResults / size < 1
? Math.floor(result.totalResults / size)