Browse Source

add search index by host and host page URL

main
ghost 1 year ago
parent
commit
b13293988a
  1. 9
      config/sphinx.conf.txt

9
config/sphinx.conf.txt

@ -16,6 +16,12 @@ source hostPage : common
`hostPage`.`uri`, \ `hostPage`.`uri`, \
`hostPage`.`rank`, \ `hostPage`.`rank`, \
`host`.`name`, \ `host`.`name`, \
IF (`host`.`port` IS NOT NULL, \
CONCAT(`host`.`scheme`, '://', `host`.`name`, ':', `host`.`port`), \
CONCAT(`host`.`scheme`, '://', `host`.`name`)) AS `hostURL`, \
IF (`host`.`port` IS NOT NULL, \
CONCAT(`host`.`scheme`, '://', `host`.`name`, ':', `host`.`port`, `hostPage`.`uri`), \
CONCAT(`host`.`scheme`, '://', `host`.`name`, `hostPage`.`uri`)) AS `hostPageURL`, \
REGEXP_REPLACE(`hostPage`.`mime`, '^([A-z-]+)/[A-z-]+.*', '$1') AS `mime`, \ REGEXP_REPLACE(`hostPage`.`mime`, '^([A-z-]+)/[A-z-]+.*', '$1') AS `mime`, \
(SELECT GROUP_CONCAT(CONCAT_WS(' ', `hostPageDescription`.`title`, \ (SELECT GROUP_CONCAT(CONCAT_WS(' ', `hostPageDescription`.`title`, \
`hostPageDescription`.`description`, \ `hostPageDescription`.`description`, \
@ -28,6 +34,9 @@ source hostPage : common
sql_attr_uint = rank sql_attr_uint = rank
sql_attr_string = mime sql_attr_string = mime
sql_attr_string = uri
sql_attr_string = hostURL
sql_attr_string = hostPageURL
} }
index hostPage index hostPage

Loading…
Cancel
Save