Class: ContentEmbedding::SiteMapEmbedding
- Inherits:
-
ContentEmbedding
- Object
- ContentEmbedding
- ContentEmbedding::SiteMapEmbedding
- Includes:
- TextSearchable
- Defined in:
- app/models/content_embedding/site_map_embedding.rb
Overview
== Schema Information
Table name: content_embeddings_site_maps
Database name: primary
id :bigint not null, primary key
content_hash :string(32)
content_type :string default("primary"), not null
embeddable_type :string not null
embedding_dimensions :integer
embedding_model :string
locale :string default("en")
model :string
token_count :integer
unified_embedding :vector
created_at :timestamp not null
updated_at :timestamp not null
embeddable_id :bigint not null
Indexes
idx_content_embeddings_site_maps_embedding_model (embedding_model)
idx_content_embeddings_site_maps_unique (embeddable_id,content_type,locale) UNIQUE
Foreign Keys
fk_content_embeddings_site_maps_embeddable (embeddable_id => site_maps.id) ON DELETE => cascade
ContentEmbedding STI subclass for site map embeddings.
Constant Summary
Constants included from TextSearchable
TextSearchable::SIMILARITY_THRESHOLD
Belongs to collapse
- #embeddable ⇒ SiteMap (also: #site_map)
Class Method Summary collapse
-
.locale_filtered? ⇒ Boolean
SiteMap pages have locale-specific content.
-
.primary_content ⇒ ActiveRecord::Relation<ContentEmbedding::SiteMapEmbedding>
A relation of ContentEmbedding::SiteMapEmbeddings that are primary content.
Methods included from TextSearchable
apply_locale_filter, apply_published_filter, generate_text_query_embedding, semantic_search
Class Method Details
.locale_filtered? ⇒ Boolean
SiteMap pages have locale-specific content
47 48 49 |
# File 'app/models/content_embedding/site_map_embedding.rb', line 47 def locale_filtered? true end |
.primary_content ⇒ ActiveRecord::Relation<ContentEmbedding::SiteMapEmbedding>
A relation of ContentEmbedding::SiteMapEmbeddings that are primary content. Active Record Scope
43 |
# File 'app/models/content_embedding/site_map_embedding.rb', line 43 scope :primary_content, -> { where(content_type: 'primary') } |
Instance Method Details
#embeddable ⇒ SiteMap Also known as: site_map
38 |
# File 'app/models/content_embedding/site_map_embedding.rb', line 38 belongs_to :embeddable, class_name: 'SiteMap' |