Class: ContentEmbedding::SiteMapEmbedding
- Inherits:
-
ContentEmbedding
- Object
- ContentEmbedding
- ContentEmbedding::SiteMapEmbedding
- Includes:
- TextSearchable
- Defined in:
- app/models/content_embedding/site_map_embedding.rb
Constant Summary
Constants included from TextSearchable
TextSearchable::EMBEDDING_MODEL, 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.
-
.with_embedding ⇒ ActiveRecord::Relation<ContentEmbedding::SiteMapEmbedding>
A relation of ContentEmbedding::SiteMapEmbeddings that are with embedding.
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
48 49 50 |
# File 'app/models/content_embedding/site_map_embedding.rb', line 48 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') } |
.with_embedding ⇒ ActiveRecord::Relation<ContentEmbedding::SiteMapEmbedding>
A relation of ContentEmbedding::SiteMapEmbeddings that are with embedding. Active Record Scope
44 |
# File 'app/models/content_embedding/site_map_embedding.rb', line 44 scope :with_embedding, -> { where.not(embedding: nil) } |
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' |