-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #458 from mcneilco/ACAS-710
ACAS-710: Code table label text search and short name match query parameters
- Loading branch information
Showing
3 changed files
with
101 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/main/resources/db/migration/postgres/V2.4.2.2__ddict_value_label_text_search_index.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
DO $$ | ||
BEGIN | ||
IF NOT EXISTS ( | ||
SELECT 1 | ||
FROM pg_class c | ||
JOIN pg_namespace n ON n.oid = c.relnamespace | ||
WHERE c.relname = 'ddict_value_labeltext_tsvector_idx' | ||
) | ||
THEN | ||
CREATE INDEX ddict_value_labeltext_tsvector_idx ON ddict_value USING GIN (to_tsvector('english', label_text)); | ||
END IF; | ||
END | ||
$$; | ||
|
||
DO $$ | ||
BEGIN | ||
IF NOT EXISTS ( | ||
SELECT 1 | ||
FROM pg_class c | ||
JOIN pg_namespace n ON n.oid = c.relnamespace | ||
WHERE c.relname = 'idx_ddictvalue_labeltext_lower_pattern' | ||
) | ||
THEN | ||
CREATE INDEX idx_ddictvalue_labeltext_lower_pattern ON ddict_value(lower(label_text) varchar_pattern_ops); | ||
END IF; | ||
END | ||
$$; |