You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using pg_search in my project and have 'searchable' column:
class AddSearchableColumnToEntities < ActiveRecord::Migration[7.0]
def up
execute <<-SQL
ALTER TABLE entities
ADD COLUMN searchable tsvector GENERATED ALWAYS AS (
setweight(to_tsvector('english', coalesce(title, '')), 'A') ||
setweight(to_tsvector('english', coalesce(source_page_description,'')), 'B')
) STORED;
SQL
end
def down
remove_column :entities, :searchable
end
end
Is it possible to create indexes if I'm expecting title and source_page_description being written in other languages, not only in English?
Hi,
I'm using pg_search in my project and have 'searchable' column:
Is it possible to create indexes if I'm expecting
title
andsource_page_description
being written in other languages, not only in English?I also have search scope like this:
I was looking for examples how I can achieve it with pg_search, but only found how to do it with English language.
Is it supported to have multi-language indexes on same model?
Many thanks!
The text was updated successfully, but these errors were encountered: