diff --git a/README.md b/README.md index 6c7a1ea6ae06a7d71f016dc4b5bb26f14119fdcd..5806b12a184391d227d1c7d9e6163981da3df242 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 fd8bc6bf0d1c9b300a44e0a585dc82e2d1d85189..b30dc193394efaaefd616436210117eb0eb0f9e9 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', '');