YGGstate/ example/environment /sphinx.conf

79 lines
3.2 KiB
Plaintext
Raw Normal View History

2023-08-13 14:54:00 +00:00
source yggstate
{
type = mysql
2023-08-13 16:48:01 +00:00
sql_port = 3306
2023-08-13 14:54:00 +00:00
sql_host = localhost
sql_user =
sql_pass =
sql_db =
}
source peer : yggstate
{
2023-08-13 16:48:01 +00:00
sql_query = \
SELECT `peer`.`peerId`, \
`peer`.`address` AS `peerAddress`, \
`peer`.`key` AS `peerKey`, \
2023-08-13 14:54:00 +00:00
(SELECT GROUP_CONCAT(DISTINCT `peerCoordinate`.`port`) \
FROM `peerCoordinate` \
WHERE `peerCoordinate`.`peerId` = `peer`.`peerId`) AS `peerCoordinatePort`, \
(SELECT GROUP_CONCAT(DISTINCT `peerCoordinateRoute`.`port`) \
FROM `peerCoordinateRoute` \
JOIN `peerCoordinate` ON (`peerCoordinate`.`peerCoordinateId` = `peerCoordinateRoute`.`peerCoordinateId`) \
WHERE `peerCoordinate`.`peerId` = `peer`.`peerId`) AS `peerCoordinateRoute`, \
(SELECT GROUP_CONCAT(DISTINCT `peerRemoteScheme`.`name`) \
FROM `peerRemote` \
JOIN `peerRemoteScheme` ON (`peerRemoteScheme`.`peerRemoteSchemeId` = `peerRemote`.`peerRemoteSchemeId`) \
2023-08-13 16:48:01 +00:00
WHERE `peerRemote`.`peerId` = `peer`.`peerId`) AS `peerRemoteScheme`, \
2023-08-13 14:54:00 +00:00
(SELECT GROUP_CONCAT(DISTINCT `peerRemoteHost`.`name`) \
FROM `peerRemote` \
JOIN `peerRemoteHost` ON (`peerRemoteHost`.`peerRemoteHostId` = `peerRemote`.`peerRemoteHostId`) \
2023-08-13 16:48:01 +00:00
WHERE `peerRemote`.`peerId` = `peer`.`peerId`) AS `peerRemoteHost`, \
2023-08-13 14:54:00 +00:00
(SELECT GROUP_CONCAT(DISTINCT `peerRemotePort`.`name`) \
FROM `peerRemote` \
JOIN `peerRemotePort` ON (`peerRemotePort`.`peerRemotePortId` = `peerRemote`.`peerRemotePortId`) \
2023-08-14 16:29:10 +00:00
WHERE `peerRemote`.`peerId` = `peer`.`peerId`) AS `peerRemotePort`, \
(SELECT GROUP_CONCAT(DISTINCT `geoCountry`.`isoCode`) \
FROM `peerRemote` \
JOIN `geo` ON (`geo`.`geoId` = `peerRemote`.`geoId`) \
JOIN `geoCountry` ON (`geoCountry`.`geoCountryId` = `geo`.`geoCountryId`) \
WHERE `peerRemote`.`peerId` = `peer`.`peerId` \
) AS `geoCountryIsoCode`, \
(SELECT GROUP_CONCAT(DISTINCT `geoCountry`.`name`) \
FROM `peerRemote` \
JOIN `geo` ON (`geo`.`geoId` = `peerRemote`.`geoId`) \
JOIN `geoCountry` ON (`geoCountry`.`geoCountryId` = `geo`.`geoCountryId`) \
WHERE `peerRemote`.`peerId` = `peer`.`peerId` \
) AS `geoCountryName`, \
(SELECT GROUP_CONCAT(DISTINCT `geoCity`.`name`) \
FROM `peerRemote` \
JOIN `geo` ON (`geo`.`geoId` = `peerRemote`.`geoId`) \
JOIN `geoCity` ON (`geoCity`.`geoCityId` = `geo`.`geoCityId`) \
WHERE `peerRemote`.`peerId` = `peer`.`peerId` \
) AS `geoCityName` \
2023-08-13 14:54:00 +00:00
FROM `peer`\
2023-08-13 16:48:01 +00:00
sql_field_string = peerAddress
sql_field_string = peerKey
sql_field_string = peerCoordinatePort
sql_field_string = peerCoordinateRoute
sql_field_string = peerRemoteScheme
sql_field_string = peerRemoteHost
sql_field_string = peerRemotePort
2023-08-14 16:29:10 +00:00
sql_field_string = geoCountryIsoCode
sql_field_string = geoCountryName
sql_field_string = geoCityName
2023-08-13 14:54:00 +00:00
}
index peer
{
source = peer
path = /var/lib/sphinxsearch/data/peer
}
indexer
{
mem_limit = 256M
lemmatizer_cache = 256M
}