Line 1: |
Line 1: |
| Log into mariadb as root and run <code>INSTALL SONAME 'ha_sphinx';</code> then <code>show engines;</code> to confirm it worked | | Log into mariadb as root and run <code>INSTALL SONAME 'ha_sphinx';</code> then <code>show engines;</code> to confirm it worked |
| + | |
| + | == Create Table == |
| | | |
| <pre> | | <pre> |
| + | CREATE TABLE AttachmentsIndex |
| + | ( |
| + | id BIGINT NOT NULL, |
| + | weight INTEGER NOT NULL, |
| + | query VARCHAR(3072) NOT NULL, |
| + | group_id INTEGER, |
| + | INDEX(query) |
| + | ) ENGINE=SPHINX CONNECTION="sphinx://127.0.0.1:9312/rt" CHARACTER SET utf8; |
| + | </pre> |
| | | |
− | Going to run the following in the DB:
| + | == More output == |
− | CREATE TABLE AttachmentsIndex (
| |
− | id BIGINT NOT NULL,
| |
− | weight INTEGER NOT NULL,
| |
− | query VARCHAR(3072) NOT NULL,
| |
− | INDEX(query)
| |
− | ) ENGINE=SPHINX CONNECTION="sphinx://127.0.0.1:3312/rt" CHARACTER SET utf8
| |
| | | |
| + | I added The following to RT_SiteConfig.pm |
| | | |
− | | + | <pre> |
− | You can now configure RT to use the newly-created full-text index by
| |
− | adding the following to your RT_SiteConfig.pm:
| |
− | | |
| Set( %FullTextSearch, | | Set( %FullTextSearch, |
| Enable => 1, | | Enable => 1, |
Line 22: |
Line 25: |
| Table => 'AttachmentsIndex', | | Table => 'AttachmentsIndex', |
| ); | | ); |
| + | </pre> |
| | | |
| Below is a simple Sphinx configuration which can be used to index all | | Below is a simple Sphinx configuration which can be used to index all |
Line 27: |
Line 31: |
| ideal; you should read the Sphinx documentation to understand how to | | ideal; you should read the Sphinx documentation to understand how to |
| configure it to better suit your needs. | | configure it to better suit your needs. |
| + | <pre> |
| | | |
| source rt { | | source rt { |
Line 58: |
Line 63: |
| | | |
| searchd { | | searchd { |
− | port = 3312 | + | port = 9312 |
| log = /opt/rt4/var/sphinx/searchd.log | | log = /opt/rt4/var/sphinx/searchd.log |
| query_log = /opt/rt4/var/sphinx/query.log | | query_log = /opt/rt4/var/sphinx/query.log |
Line 69: |
Line 74: |
| unlink_old = 1 | | unlink_old = 1 |
| } | | } |
| + | |
| </pre> | | </pre> |
− |
| |
| | | |
| == Prime things == | | == Prime things == |