-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.sample.json
25 lines (25 loc) · 1021 Bytes
/
config.sample.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
"selectQuery" : "SELECT `i`.`id`, `i`.`type`,`i`.`title`,`i`.`lastVote`, `i`.`file`,
CONCAT(IFNULL(`i`.`description`, ''), ' ', IFNULL(`i`.`content`,'')) AS content,
COALESCE(SUM(CASE WHEN `a`.`isUpvote` THEN 1 ELSE -1 END),0) AS rating
FROM `submissions` AS i
LEFT JOIN `votes` AS a
ON `i`.`id` = `a`.`post`
GROUP BY `i`.`id`",
"updateQuery" : "SELECT `i`.`id`, `i`.`type`,`i`.`title`,`i`.`lastVote`, `i`.`file`,
CONCAT(IFNULL(`i`.`description`, ''), ' ', IFNULL(`i`.`content`,'')) AS content,
COALESCE(SUM(CASE WHEN `a`.`isUpvote` THEN 1 ELSE -1 END),0) AS rating
FROM `submissions` AS i
LEFT JOIN `votes` AS a
ON `i`.`id` = `a`.`post`
WHERE `i`.`lastVote` > _$
GROUP BY `i`.`id`",
"primaryField" : "id",
"updatedAtField": "lastVote",
"source" : "jdbc:mysql://HostnameOfYourDatabase/YourDatabaseName",
"username" : "Your MYSQL Username",
"password" : "Your MYSQL Password",
"applicationId" : "Your Algolia Application ID",
"apiKey" : "Your Algolia API Key",
"index" : "Your Algolia Index Name",
}