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:
parent
d2fb4db7c6
commit
5a4a30e0b0
5
src/@types/aquarius/SearchResponse.d.ts
vendored
5
src/@types/aquarius/SearchResponse.d.ts
vendored
@ -20,7 +20,10 @@ interface SearchResponse {
|
|||||||
_scroll_id?: string | undefined
|
_scroll_id?: string | undefined
|
||||||
_shards: ShardsResponse
|
_shards: ShardsResponse
|
||||||
hits: {
|
hits: {
|
||||||
total: number
|
total: {
|
||||||
|
relation: string
|
||||||
|
value: number
|
||||||
|
}
|
||||||
max_score: number
|
max_score: number
|
||||||
hits: Array<{
|
hits: Array<{
|
||||||
_index: string
|
_index: string
|
||||||
|
@ -79,7 +79,7 @@ export function transformQueryResult(
|
|||||||
result.results = (queryResult.hits.hits || []).map(
|
result.results = (queryResult.hits.hits || []).map(
|
||||||
(hit) => hit._source as Asset
|
(hit) => hit._source as Asset
|
||||||
)
|
)
|
||||||
result.totalResults = queryResult.hits.total
|
result.totalResults = queryResult.hits.total.value
|
||||||
result.totalPages =
|
result.totalPages =
|
||||||
result.totalResults / size < 1
|
result.totalResults / size < 1
|
||||||
? Math.floor(result.totalResults / size)
|
? Math.floor(result.totalResults / size)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user