Repository navigation
Releases
Releases · carlosfunk/django-location-api
v0.3.0 - Postgres full-text search
Added
- Postgres full-text search on Location: New
search_vector
SearchVectorFieldonAbstractBaseLocationwith a GIN index. The
vector combinesname(weight A) with string and numeric values from
attributesJSONField (weight B), so attribute contents are
searchable out of the box without per-project configuration. - Auto-installed trigger:
location_api_corewires a
post_migratesignal that installs (and refreshes on every migrate) a
Postgres trigger on each concreteAbstractBaseLocationsubclass's
table. Existing rows are backfilled on first run. Consumers only need to
makemigrationsafter upgrading to pick up the new column and index.
Changed
- LocationSearchView now uses
SearchQuery/SearchRankagainst
the newsearch_vector(web-search syntax,simpleFTS config),
ordered by rank. Supplier name remains searchable via an OR'd
icontainsfallback, since supplier rename propagation is
deliberately not part of the vector.