From 0b12e872a36f1ad261e14254774fae295223eade Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 8 Apr 2023 18:22:53 +0300 Subject: [PATCH] add host name to the search index --- config/sphinx.conf.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config/sphinx.conf.txt b/config/sphinx.conf.txt index 3cdad03..3fcf025 100644 --- a/config/sphinx.conf.txt +++ b/config/sphinx.conf.txt @@ -9,8 +9,10 @@ source hostPage sql_port = 3306 # optional, default is 3306 sql_query = \ - SELECT hostPageId, metaTitle, metaDescription, metaKeywords, data, uri \ - FROM hostPage WHERE httpCode = 200 + SELECT hostPage.hostPageId, hostPage.metaTitle, hostPage.metaDescription, hostPage.metaKeywords, hostPage.data, hostPage.uri, host.name \ + FROM hostPage \ + JOIN host ON (host.hostId = hostPage.hostId) \ + WHERE hostPage.httpCode = 200 sql_attr_uint = hostPageId }