mirror of
https://github.com/YGGverse/YGGstate.git
synced 2025-01-24 05:24:36 +00:00
add sphinx search conf example
This commit is contained in:
parent
0b5bb61a15
commit
0f79b1fe3a
60
example/environment /sphinx.conf
Normal file
60
example/environment /sphinx.conf
Normal file
@ -0,0 +1,60 @@
|
||||
source yggstate
|
||||
{
|
||||
type = mysql
|
||||
|
||||
sql_host = localhost
|
||||
sql_user =
|
||||
sql_pass =
|
||||
sql_db =
|
||||
sql_port = 3306 # optional, default is 3306
|
||||
}
|
||||
|
||||
source peer : yggstate
|
||||
{
|
||||
sql_query = \
|
||||
SELECT `peer`.`key`, \
|
||||
`peer`.`address`, \
|
||||
`peer`.`peerId`, \
|
||||
`peer`.`timeAdded`, \
|
||||
(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`) \
|
||||
WHERE `peerRemote`.`peerId` = `peer`.`peerId`) AS `remoteScheme`, \
|
||||
(SELECT GROUP_CONCAT(DISTINCT `peerRemoteHost`.`name`) \
|
||||
FROM `peerRemote` \
|
||||
JOIN `peerRemoteHost` ON (`peerRemoteHost`.`peerRemoteHostId` = `peerRemote`.`peerRemoteHostId`) \
|
||||
WHERE `peerRemote`.`peerId` = `peer`.`peerId`) AS `remoteHost`, \
|
||||
(SELECT GROUP_CONCAT(DISTINCT `peerRemotePort`.`name`) \
|
||||
FROM `peerRemote` \
|
||||
JOIN `peerRemotePort` ON (`peerRemotePort`.`peerRemotePortId` = `peerRemote`.`peerRemotePortId`) \
|
||||
WHERE `peerRemote`.`peerId` = `peer`.`peerId`) AS `remotePort` \
|
||||
FROM `peer`\
|
||||
|
||||
sql_attr_string = address
|
||||
sql_attr_string = key
|
||||
sql_attr_string = peerCoordinatePort
|
||||
sql_attr_string = peerCoordinateRoute
|
||||
sql_attr_string = remoteScheme
|
||||
sql_attr_string = remoteHost
|
||||
sql_attr_uint = remotePort
|
||||
sql_attr_uint = timeAdded
|
||||
}
|
||||
|
||||
index peer
|
||||
{
|
||||
source = peer
|
||||
path = /var/lib/sphinxsearch/data/peer
|
||||
}
|
||||
|
||||
indexer
|
||||
{
|
||||
mem_limit = 256M
|
||||
lemmatizer_cache = 256M
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user