diff --git a/ml_metadata/util/metadata_source_query_config.cc b/ml_metadata/util/metadata_source_query_config.cc index a815a52e5..5e581878e 100644 --- a/ml_metadata/util/metadata_source_query_config.cc +++ b/ml_metadata/util/metadata_source_query_config.cc @@ -5554,6 +5554,9 @@ R"pb( )pb", R"pb( # secondary indices in the current schema. + secondary_indices { + query: " CREATE EXTENSION IF NOT EXISTS pg_trgm; " + } secondary_indices { query: " CREATE INDEX IF NOT EXISTS idx_artifact_uri ON Artifact (uri); " " CREATE INDEX IF NOT EXISTS " @@ -5610,7 +5613,7 @@ R"pb( secondary_indices { query: " CREATE INDEX IF NOT EXISTS " " idx_artifact_property_string " - " ON ArtifactProperty (name, is_custom_property, string_value); " + " ON ArtifactProperty USING gist (name gist_trgm_ops, string_value gist_trgm_ops); " } secondary_indices { query: " CREATE INDEX IF NOT EXISTS " @@ -5625,7 +5628,7 @@ R"pb( secondary_indices { query: " CREATE INDEX IF NOT EXISTS " " idx_execution_property_string " - " ON ExecutionProperty (name, is_custom_property, string_value); " + " ON ExecutionProperty USING gist (name gist_trgm_ops, string_value gist_trgm_ops); " } secondary_indices { query: " CREATE INDEX IF NOT EXISTS " @@ -5640,7 +5643,7 @@ R"pb( secondary_indices { query: " CREATE INDEX IF NOT EXISTS " " idx_context_property_string " - " ON ContextProperty (name, is_custom_property, string_value); " + " ON ContextProperty USING gist (name gist_trgm_ops, string_value gist_trgm_ops); " } secondary_indices { query: " CREATE INDEX IF NOT EXISTS idx_type_external_id "