From f980b6318c68a4b202df400d8fb42395f747abb4 Mon Sep 17 00:00:00 2001 From: ghost Date: Thu, 4 May 2023 04:20:20 +0300 Subject: [PATCH] add page meta to the image index --- config/sphinx.conf.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/sphinx.conf.txt b/config/sphinx.conf.txt index 518d8d4..53d9d2d 100644 --- a/config/sphinx.conf.txt +++ b/config/sphinx.conf.txt @@ -26,7 +26,10 @@ source hostImage : common SELECT hostImage.hostImageId, hostImage.rank, hostImage.uri, host.name, \ (SELECT GROUP_CONCAT(CONCAT_WS(' ', hostImageDescription.alt, hostImageDescription.title)) \ FROM hostImageDescription \ - WHERE hostImageDescription.hostImageId = hostImage.hostImageId) AS imageDescription \ + WHERE hostImageDescription.hostImageId = hostImage.hostImageId) AS imageDescription, \ + (SELECT GROUP_CONCAT(CONCAT_WS(' ', hostPage.metaTitle, hostPage.metaDescription, hostPage.metaKeywords)) \ + FROM hostPage \ + WHERE hostPage.hostPageId IN (SELECT hostImageToHostPage.hostPageId FROM hostImageToHostPage WHERE hostImageToHostPage.hostImageId = hostImage.hostImageId)) AS pageDescription \ FROM hostImage \ JOIN host ON (host.hostId = hostImage.hostId) \ WHERE host.status = '1' AND hostImage.httpCode = 200