User Manual

04.15.2025

MANUAL

Generate a PostgreSQL Full-text Index

## Overview If you are using PostgreSQL version 1.4.6 or earlier and want to use "「Cross Search」" or select "Full-text" in "「Search Type」", please create a full-text index using this procedure. Creating a full-text index will improve the performance of free text search for tables with "「Cross Search」" or "「Search Type」" selected as "Full-text", but if you want to further improve performance, please consider improving the performance of the server. This is a quick reference table of what is required for this procedure. Please check it against your environment. |DB|Initial build version|Necessity of work|Impact if this procedure is not performed|Note| |---|---|---|---|---| |SQL Server|All versions|Not required|-|-| |PostgreSQL|1.4.6 or earlier|Required|In cross-search or free text search when "full text" is selected as the search type, it takes time to display search results.|If the version at the time of initial build is 1.4.6 or earlier, a full text index will not be generated unless this procedure is performed even if the version is upgraded.| |PostgreSQL|1.4.7 or later|Not required|-|If the version at the time of initial build is 1.4.7 or later, a full text index will be generated at the time of installation, so this procedure is not required.| |MySQL|All versions|Not required|-|-| ## Notes 1. Depending on the configuration of Pleasanter and the number of data items, it may take some time to execute the SQL to generate a full-text index. ## Prerequisites 1. This applies to environments where the database uses PostgreSQL and where a new installation was performed with version 1.4.6 or earlier. It does not apply to environments that use SQL Server or MySQL, or new installations with version 1.4.7 or later. 1. If the PostgreSQL environment is one where the version at the time of new installation is 1.4.6 or earlier, even if the version has been upgraded to the latest version, a full-text index will be created by performing this procedure. ## Setup Procedure 1. Connect to the Pleasanter database and execute the following SQL. If one or more search results are displayed, the index for the full-text column has already been generated, so the following steps are unnecessary. ##### SQL ```sql select * from pg_indexes where tablename = 'Items' and indexdef like '%FullText%'; ``` 1. Log in to the server where Pleasanter is installed and stop Pleasanter. 1. Log in to the Pleasanter database as "Implem.Pleasanter_Owner" and connect. ##### CMD ``` # psql -U Implem.Pleasanter_Owner -d Implem.Pleasanter -p 5432 ``` 1. Execute the following SQL to generate a full-text index. ##### SQL ```sql create index "ftx" on "Items" using gin ("FullText" gin_trgm_ops); ``` 1. Execute the following SQL to confirm that the full-text index has been generated. If the search results are displayed as shown in the figure below, the full-text index has been generated. ##### SQL ```sql select * from pg_indexes where tablename = 'Items' and indexdef like '%FullText%'; ``` ![image](https://pleasanter.org/binaries/15aa5d00944f4ccc9dda43cc8c691d95) 1. Start Pleasanter. There is no need to restart PostgreSQL.
TOP
このページをシェアする
記載された商品名、各製品名は各社の登録商標または商標です。 © Implem Inc.