From 57b89d9cd958edbef8e684511e461a22af35afd2 Mon Sep 17 00:00:00 2001 From: Janne Koschinski <janne@kuschku.de> Date: Sat, 13 Feb 2021 13:01:29 +0100 Subject: [PATCH] Improve readme --- README.md | 62 +++++++++++++++++++++++++++++++++++++++--- qrs_config.default.php | 31 ++++++++++++++++++++- 2 files changed, 88 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6c7a1ea..5806b12 100644 --- a/README.md +++ b/README.md @@ -42,23 +42,77 @@ CREATE TRIGGER tsvectorupdate Fourth, populate the `tsv` column: ```sql -UPDATE backlog SET messageid = messageid; +UPDATE backlog +SET messageid = messageid; ``` Setting up the search --------------------- -First, rename the file `qrs_config.default.php` to `qrs_config.php`. +First, copy the file `qrs_config.default.php` to `qrs_config.php`. Then configure the database access, backend (currently only `pgsql-smart` is available), and the prefix of the path. +Your qrs_config.php should look something like this + +```injectablephp +<?php +// Here you should put the hostname of your postgres database +define('qrs_db_host', 'example.com'); +// This is the port of your postgres database, usually it should stay at 5432 +define('qrs_db_port', 5432); +// The username of the database in the postgres database +define('qrs_db_name', 'quassel'); + +// Only change this if you know what you are doing +define('qrs_db_connector', null); + +// Username and password QRS should use to connect to your database +// (not your quassel user/pass) +define('qrs_db_user', 'quassel'); +define('qrs_db_pass', 'password'); + +// Configure the primary language of your database here. Supported are: +// - simple (works for every language, but worse than configuring the correct language) +// - arabic +// - danish +// - dutch +// - english +// - finnish +// - french +// - german +// - hungarian +// - indonesian +// - irish +// - italian +// - lithuanian +// - nepali +// - norwegian +// - portuguese +// - romanian +// - russian +// - spanish +// - swedish +// - tamil +// - turkish +define('qrs_db_option_tsqueryfunction', "websearch_to_tsquery('english', :query)"); +// Timeout in milliseconds +define('qrs_db_option_timeout', 5000); + +define('qrs_backend', 'pgsql-smart'); +define('qrs_enable_ranking', false); + +// If you install QRS in a subfolder, put the path to the subfolder, without trailing /, here. +define('qrs_path_prefix', ''); +``` + Development ----------- Please install the required libraries for development with `npm install` -Before every commit, git will automatically run `npm run jsx`, but you can do so yourself during testing. -The project uses `nativejsx` +Before every commit, git will automatically run `npm run jsx`, but you can do so yourself during testing. The project +uses `nativejsx` License and Credits ------------------- diff --git a/qrs_config.default.php b/qrs_config.default.php index fd8bc6b..b30dc19 100644 --- a/qrs_config.default.php +++ b/qrs_config.default.php @@ -1,19 +1,48 @@ <?php +// Here you should put the hostname of your postgres database define('qrs_db_host', 'example.com'); +// This is the port of your postgres database, usually it should stay at 5432 define('qrs_db_port', 5432); +// The username of the database in the postgres database define('qrs_db_name', 'quassel'); // Only change this if you know what you are doing define('qrs_db_connector', null); +// Username and password QRS should use to connect to your database +// (not your quassel user/pass) define('qrs_db_user', 'quassel'); define('qrs_db_pass', 'password'); -define('qrs_db_option_tsqueryfunction', "plainto_tsquery('english', :query)"); +// Configure the primary language of your database here. Supported are: +// - simple (works for every language, but worse than configuring the correct language) +// - arabic +// - danish +// - dutch +// - english +// - finnish +// - french +// - german +// - hungarian +// - indonesian +// - irish +// - italian +// - lithuanian +// - nepali +// - norwegian +// - portuguese +// - romanian +// - russian +// - spanish +// - swedish +// - tamil +// - turkish +define('qrs_db_option_tsqueryfunction', "websearch_to_tsquery('english', :query)"); // Timeout in milliseconds define('qrs_db_option_timeout', 5000); define('qrs_backend', 'pgsql-smart'); define('qrs_enable_ranking', false); +// If you install QRS in a subfolder, put the path to the subfolder, without trailing /, here. define('qrs_path_prefix', ''); -- GitLab