-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added target.{id,name,type} to pg index (#1510)
* added target.{id,name,type} to pg index * feat: Add target properties to event query parsing and filtering --------- Co-authored-by: ukrocks007 <[email protected]>
- Loading branch information
1 parent
c24daff
commit 0cfcf8a
Showing
5 changed files
with
148 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- SQL goes here | ||
-- GIN jsonb_path_ops for equality queries | ||
CREATE INDEX target_id_idx ON indexed_events USING GIN ((doc -> 'target' -> 'id') jsonb_path_ops); | ||
|
||
-- expression indexes used for matching (@@) tsquery types | ||
CREATE INDEX target_name_idx ON indexed_events USING GIN (to_tsvector('english', (doc -> 'target' -> 'name'))); | ||
CREATE INDEX target_type_idx ON indexed_events USING GIN (to_tsvector('english', (doc -> 'target' -> 'type'))); |
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 @@ | ||
-- SQL goes here |
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
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