Vehicle ETL Process fixed. Admin settings fixed.

This commit is contained in:
Eric Gullickson
2025-12-15 20:51:52 -06:00
parent 1a9ead9d9d
commit b84d4c7fef
23 changed files with 4553 additions and 2450 deletions

View File

@@ -0,0 +1,14 @@
-- Migration: Add full-text search index for vehicle catalog search
-- Date: 2025-12-15
-- Add full-text search index on vehicle_options table
-- Combines year, make, model, and trim into a single searchable tsvector
-- Using || operator instead of concat() because || is IMMUTABLE
CREATE INDEX IF NOT EXISTS idx_vehicle_options_fts ON vehicle_options
USING gin(to_tsvector('english', year::text || ' ' || make || ' ' || model || ' ' || trim));
-- Add an index on engines.name for join performance during search
CREATE INDEX IF NOT EXISTS idx_engines_name ON engines(name);
-- Add comment for documentation
COMMENT ON INDEX idx_vehicle_options_fts IS 'Full-text search index for admin catalog search functionality';