]> git.ipfire.org Git - location/libloc.git/commitdiff
importer: Add search index to announcements table
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 21 Oct 2020 13:53:36 +0000 (13:53 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 21 Oct 2020 13:53:36 +0000 (13:53 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/python/location-importer.in

index e87d378e1a3759affe65eb570c5956da7a71d7b9..d0fe5a69592ae57cf38fd1118a1fd774e6130ed5 100644 (file)
@@ -152,6 +152,7 @@ class CLI(object):
                                        last_seen_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP);
                                CREATE UNIQUE INDEX IF NOT EXISTS announcements_networks ON announcements(network);
                                CREATE INDEX IF NOT EXISTS announcements_family ON announcements(family(network));
+                               CREATE INDEX IF NOT EXISTS announcements_search ON announcements USING GIST(network inet_ops);
 
                                -- autnums
                                CREATE TABLE IF NOT EXISTS autnums(number bigint, name text NOT NULL);