Fixed search documents to coalesce empty parent entities.
This commit is contained in:
parent
08dc06c810
commit
ff384fb734
|
@ -314,8 +314,8 @@ export default {
|
||||||
|
|
||||||
.logo-site {
|
.logo-site {
|
||||||
height: 3rem;
|
height: 3rem;
|
||||||
width: 100%;
|
|
||||||
max-width: 15rem;
|
max-width: 15rem;
|
||||||
|
margin: .25rem 0;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
object-position: 100% 50%;
|
object-position: 100% 50%;
|
||||||
}
|
}
|
||||||
|
@ -470,7 +470,7 @@ export default {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.site {
|
.logo-site {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,6 +85,14 @@ export default {
|
||||||
|
|
||||||
.releases {
|
.releases {
|
||||||
border-top: solid 1px var(--crease);
|
border-top: solid 1px var(--crease);
|
||||||
|
|
||||||
|
&.embedded {
|
||||||
|
border: none;
|
||||||
|
|
||||||
|
.tiles {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tiles {
|
.tiles {
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
|
|
||||||
<Releases
|
<Releases
|
||||||
v-if="!loading && releases.length > 0"
|
v-if="!loading && releases.length > 0"
|
||||||
|
class="embedded"
|
||||||
:releases="releases"
|
:releases="releases"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -93,6 +94,10 @@ export default {
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import 'theme';
|
@import 'theme';
|
||||||
|
|
||||||
|
.content-inner {
|
||||||
|
padding: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
.summary {
|
.summary {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 0 1rem 0;
|
margin: 0 0 1rem 0;
|
||||||
|
|
|
@ -43,12 +43,12 @@ function initUiActions(_store, _router) {
|
||||||
url
|
url
|
||||||
type
|
type
|
||||||
isNew
|
isNew
|
||||||
site {
|
entity {
|
||||||
id
|
id
|
||||||
slug
|
slug
|
||||||
name
|
name
|
||||||
url
|
url
|
||||||
network {
|
parent {
|
||||||
id
|
id
|
||||||
slug
|
slug
|
||||||
name
|
name
|
||||||
|
@ -105,7 +105,7 @@ function initUiActions(_store, _router) {
|
||||||
dateOfBirth
|
dateOfBirth
|
||||||
dateOfDeath
|
dateOfDeath
|
||||||
gender
|
gender
|
||||||
network {
|
entity {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
slug
|
slug
|
||||||
|
@ -124,7 +124,7 @@ function initUiActions(_store, _router) {
|
||||||
alias
|
alias
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
network {
|
entity {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
slug
|
slug
|
||||||
|
|
|
@ -2,4 +2,6 @@ SELECT tags.name FROM actors
|
||||||
LEFT JOIN releases_actors ON releases_actors.actor_id = actors.id
|
LEFT JOIN releases_actors ON releases_actors.actor_id = actors.id
|
||||||
LEFT JOIN releases_tags ON releases_tags.release_id = releases_actors.release_id
|
LEFT JOIN releases_tags ON releases_tags.release_id = releases_actors.release_id
|
||||||
LEFT JOIN tags ON tags.id = releases_tags.tag_id
|
LEFT JOIN tags ON tags.id = releases_tags.tag_id
|
||||||
WHERE actors.slug = 'vina-sky';
|
WHERE actors.slug = 'vina-sky'
|
||||||
|
GROUP BY tags.id
|
||||||
|
ORDER BY tags.name;
|
||||||
|
|
|
@ -97,6 +97,9 @@ exports.up = knex => Promise.resolve()
|
||||||
table.integer('priority', 2)
|
table.integer('priority', 2)
|
||||||
.defaultTo(0);
|
.defaultTo(0);
|
||||||
|
|
||||||
|
table.boolean('filter')
|
||||||
|
.defaultTo(false);
|
||||||
|
|
||||||
table.boolean('secondary')
|
table.boolean('secondary')
|
||||||
.defaultTo(false);
|
.defaultTo(false);
|
||||||
|
|
||||||
|
|
|
@ -174,13 +174,12 @@ async function updateReleasesSearch(releaseIds) {
|
||||||
TO_TSVECTOR(
|
TO_TSVECTOR(
|
||||||
'traxxx',
|
'traxxx',
|
||||||
COALESCE(releases.title, '') || ' ' ||
|
COALESCE(releases.title, '') || ' ' ||
|
||||||
parents.name || ' ' ||
|
|
||||||
parents.slug || ' ' ||
|
|
||||||
parents.url || ' ' ||
|
|
||||||
entities.name || ' ' ||
|
entities.name || ' ' ||
|
||||||
entities.slug || ' ' ||
|
entities.slug || ' ' ||
|
||||||
COALESCE(entities.url, '') || ' ' ||
|
|
||||||
COALESCE(entities.alias, '') || ' ' ||
|
COALESCE(entities.alias, '') || ' ' ||
|
||||||
|
COALESCE(parents.name, '') || ' ' ||
|
||||||
|
COALESCE(parents.slug, '') || ' ' ||
|
||||||
|
COALESCE(parents.alias, '') || ' ' ||
|
||||||
COALESCE(releases.shoot_id, '') || ' ' ||
|
COALESCE(releases.shoot_id, '') || ' ' ||
|
||||||
COALESCE(TO_CHAR(releases.date, 'YYYY YY MM FMMM FMmonth mon DD FMDD'), '') || ' ' ||
|
COALESCE(TO_CHAR(releases.date, 'YYYY YY MM FMMM FMmonth mon DD FMDD'), '') || ' ' ||
|
||||||
STRING_AGG(COALESCE(actors.name, ''), ' ') || ' ' ||
|
STRING_AGG(COALESCE(actors.name, ''), ' ') || ' ' ||
|
||||||
|
@ -196,7 +195,7 @@ async function updateReleasesSearch(releaseIds) {
|
||||||
LEFT JOIN tags ON local_tags.tag_id = tags.id AND tags.priority >= 7
|
LEFT JOIN tags ON local_tags.tag_id = tags.id AND tags.priority >= 7
|
||||||
LEFT JOIN tags as tags_aliases ON local_tags.tag_id = tags_aliases.alias_for AND tags_aliases.secondary = true
|
LEFT JOIN tags as tags_aliases ON local_tags.tag_id = tags_aliases.alias_for AND tags_aliases.secondary = true
|
||||||
${releaseIds ? 'WHERE releases.id = ANY(?)' : ''}
|
${releaseIds ? 'WHERE releases.id = ANY(?)' : ''}
|
||||||
GROUP BY releases.id, entities.name, entities.slug, entities.alias, entities.url, parents.name, parents.slug, parents.url;
|
GROUP BY releases.id, entities.name, entities.slug, entities.alias, parents.name, parents.slug, parents.alias;
|
||||||
`, releaseIds && [releaseIds]);
|
`, releaseIds && [releaseIds]);
|
||||||
|
|
||||||
if (documents.rows?.length > 0) {
|
if (documents.rows?.length > 0) {
|
||||||
|
|
Loading…
Reference in New Issue