Updated search query function to include ranking.
This commit is contained in:
@@ -95,7 +95,6 @@ export default {
|
||||
background: var(--profile);
|
||||
font-size: 0;
|
||||
font-weight: bold;
|
||||
box-shadow: 0 0 3px var(--darken);
|
||||
|
||||
.favicon {
|
||||
width: 2rem;
|
||||
|
||||
@@ -34,62 +34,65 @@ function initUiActions(_store, _router) {
|
||||
$query: String!
|
||||
$limit: Int = 20
|
||||
) {
|
||||
releases: searchReleases(
|
||||
results: searchReleases(
|
||||
query: $query
|
||||
first: $limit
|
||||
minimumRank: "0.025"
|
||||
) {
|
||||
id
|
||||
title
|
||||
slug
|
||||
date
|
||||
url
|
||||
isNew
|
||||
entity {
|
||||
id
|
||||
slug
|
||||
name
|
||||
url
|
||||
type
|
||||
independent
|
||||
parent {
|
||||
id
|
||||
slug
|
||||
name
|
||||
url
|
||||
release: releaseById {
|
||||
id
|
||||
title
|
||||
slug
|
||||
date
|
||||
url
|
||||
isNew
|
||||
entity {
|
||||
id
|
||||
slug
|
||||
name
|
||||
url
|
||||
type
|
||||
}
|
||||
}
|
||||
actors: releasesActors {
|
||||
actor {
|
||||
id
|
||||
slug
|
||||
name
|
||||
}
|
||||
}
|
||||
tags: releasesTags(orderBy: TAG_BY_TAG_ID__PRIORITY_DESC) {
|
||||
tag {
|
||||
id
|
||||
name
|
||||
slug
|
||||
}
|
||||
}
|
||||
poster: releasesPosterByReleaseId {
|
||||
media {
|
||||
id
|
||||
thumbnail
|
||||
lazy
|
||||
isS3
|
||||
}
|
||||
}
|
||||
covers: releasesCovers {
|
||||
media {
|
||||
id
|
||||
thumbnail
|
||||
lazy
|
||||
isS3
|
||||
}
|
||||
}
|
||||
independent
|
||||
parent {
|
||||
id
|
||||
slug
|
||||
name
|
||||
url
|
||||
type
|
||||
}
|
||||
}
|
||||
actors: releasesActors {
|
||||
actor {
|
||||
id
|
||||
slug
|
||||
name
|
||||
}
|
||||
}
|
||||
tags: releasesTags(orderBy: TAG_BY_TAG_ID__PRIORITY_DESC) {
|
||||
tag {
|
||||
id
|
||||
name
|
||||
slug
|
||||
}
|
||||
}
|
||||
poster: releasesPosterByReleaseId {
|
||||
media {
|
||||
id
|
||||
thumbnail
|
||||
lazy
|
||||
isS3
|
||||
}
|
||||
}
|
||||
covers: releasesCovers {
|
||||
media {
|
||||
id
|
||||
thumbnail
|
||||
lazy
|
||||
isS3
|
||||
}
|
||||
}
|
||||
}
|
||||
rank
|
||||
}
|
||||
actors: searchActors(
|
||||
search: $query,
|
||||
@@ -157,7 +160,7 @@ function initUiActions(_store, _router) {
|
||||
});
|
||||
|
||||
return {
|
||||
releases: res.releases.map(release => curateRelease(release)),
|
||||
releases: res.results.map(result => curateRelease(result.release)),
|
||||
actors: res.actors.map(actor => curateActor(actor)),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user