Semantic text search is a feature in which Fujitsu Enterprise Postgres searches for text data that is semantically similar to the input text without the application processing the vector data.
Automatic vectorization is the ability to automatically generate and manage semantic vectors used for semantic search of text, based on declarative definitions.
Add "pgx_vectorizer" to the parameter "shared _preload_ libraries" of spec.fepChildCrVal.customPgParams in the FEPCluster custom resource.
Execute CREATE EXTENSION for the database that uses this function. Adding the CASCADE option will also enable the dependencies pgai, pgvector, and plpython3u. After CREATE EXTENSION, execute the start_vectorize_scheduler() function to start the vectorize scheduler. Use the psql command to connect to the database you want to set up.
postgres=# CREATE EXTENSION IF NOT EXISTS pgx_vectorizer CASCADE; CREATE EXTENSION postgres=# SELECT pgx_vectorizer.start_vectorize_scheduler();
When using the automatic password generation function of SUPERUSER and setting up this feature, refer to "6.7.1 CREATE EXTENSION" and execute CREATE EXTENSION.
When creating a FEPCluster, the Operator creates a database role called "vectorizerrole" to be used by the automatic vector converter to perform vectorizations in the background.
Specify "vectorizerrole" when registering a user to perform vectorization.
postgres=# SELECT pgx_vectorize.set_worker_setting('user', 'VECTORIZE_USER', 'vectorizerrole');If you are connecting to a embedded provider and need to define environment variables such as HTTP_PROXY, refer to "2.3.16 Environment Variable Definition for Container".
For details, refer to Fujitsu Enterprise Postgres Knowledge Data Management Feature User's Guide.
Hybrid search is available by performing "5.16.2.1 Setting up Semantic Text Search and Automatic Vectorization".
To use GIN or GiST indexes as full-text indexes, enable the extension by adding "pg_trgm" or "pg_bigm" to the parameter "shared_preload_libraries" in spec.fepChildCrVal.customPgParams of the FEPCluster custom resource. Here is an example from pg_bigm:
Execute CREATE EXTENSION for the database that uses this function. Use the psql command to connect to the database you want to set up.
postgres=# CREATE EXTENSION IF NOT EXISTS pg_bigm; CREATE EXTENSION
When using the automatic password generation function of SUPERUSER and setting up this feature, refer to "6.7.1 CREATE EXTENSION" and execute CREATE EXTENSION.
For more information, including how to perform hybrid searches and how to tune them, refer to Fujitsu Enterprise Postgres Knowledge Data Management Feature User's Guide.
Upgrading Extensions
To use this function in an environment where pgx_vectorizer of version ubi9-17-2.x or earlier has been set up in the FEP server container tag, you need to upgrade the extension. After upgrading the operator, perform the version upgrade following the procedure below. Connect to the database that you want to set up using the psql command:
postgres=# ALTER EXTENSION vector UPDATE; postgres=# ALTER EXTENSION ai UPDATE; postgres=# ALTER EXTENSION pgx_vectorizer UPDATE;
If you are using the automatic password generation function of SUPERUSER and you want to set up this function,
see "6.7.2 ALTER EXTENSION" and execute the alter_extension command of ALTER EXTENSION.