-
Notifications
You must be signed in to change notification settings - Fork 827
Description
Describe the bug
I started playing with https://github.com/timescale/pg_textsearch extension. To create an index i used german dictionary WITH (text_config='german').
After clicking Create Script i do not see the additional parameter WITH (text_config='german');.
CREATE INDEX ON full_text_search USING bm25(content) WITH (text_config='german');
I wanted to export the table schema, so right-click on Tables -> full_text_search and select Scripts -> CREATE Script. I see the index script does not contain the additional parameter WITH (text_config='german');.
CREATE INDEX IF NOT EXISTS full_text_search_content_idx
ON public.full_text_search USING bm25
(content COLLATE pg_catalog."default")
TABLESPACE pg_default;
Going to Tables -> full_text_search -> Indexes -> full_text_search_content_idx -> Create Script is exactly the same as before - no WITH (text_config='german');
I also created a GIST index with gist_trgm_ops(siglen=32) parameter
CREATE INDEX ON full_text_search USING GIST (content gist_trgm_ops(siglen=32));
Create Script does not show the additional gist_trgm_ops parameter (siglen=32).
CREATE INDEX IF NOT EXISTS full_text_search_content_idx1
ON public.full_text_search USING gist
(content COLLATE pg_catalog."default" gist_trgm_ops)
WITH (fillfactor=90, buffering=auto)
TABLESPACE pg_default;
To Reproduce
Steps to reproduce the behavior:
- Install
pg_textsearchextension - Run SQL commands
CREATE EXTENSION pg_textsearch;
CREATE TABLE full_text_search (
id serial,
content text
);
CREATE INDEX ON full_text_search USING bm25(content) WITH (text_config='german');
CREATE INDEX ON full_text_search USING GIST (content gist_trgm_ops(siglen=32));
- Go to
Tables->full_text_searchand selectScripts->CREATE Script.
4.1. The additional parameterWITH (text_config='german')is missing
4.2. The Additional parameter gist_trgm_ops(siglen=32)is missing
Expected behavior
In CREATE Script, I should see WITH (text_config='german') and gist_trgm_ops(siglen=32) parameter
In psql i see everything is fine:
test=# \d+ full_text_search
Table "public.full_text_search"
Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description
---------+---------+-----------+----------+----------------------------------------------+----------+-------------+--------------+-------------
id | integer | | not null | nextval('full_text_search_id_seq'::regclass) | plain | | |
content | text | | | | extended | | |
Indexes:
"full_text_search_content_idx" bm25 (content) WITH (text_config=german)
"full_text_search_content_idx1" gist (content gist_trgm_ops (siglen='32'))
Not-null constraints:
"full_text_search_id_not_null" NOT NULL "id"
Access method: heap
pg_dump also shows everything fine
# pg_dump -Upostgres -t full_text_search --schema-only test
CREATE INDEX full_text_search_content_idx ON public.full_text_search USING bm25 (content) WITH (text_config=german);
CREATE INDEX full_text_search_content_idx1 ON public.full_text_search USING gist (content public.gist_trgm_ops (siglen='32'));
Error message
No error messages
Screenshots
Desktop (please complete the following information):
- OS: Windows 11 x64
- pgAdmin 9.12
- Mode: Desktop
- Browser Google chrome
- Package type: pgadmin4-9.12-x64.exe
Additional context
- Is not related to the
pg_textsearchextension - it's just something wrong during creating the index script - It is not related to dictionaries (I used german, italian etc.).
- in GIST i tried different values of
siglen- all the time,siglenis missing
Metadata
Metadata
Assignees
Labels
Type
Projects
Status