enum
PgORM::FullTextSearch::Weight
Overview
Column weights for full-text search ranking.
PostgreSQL assigns different weights to text based on importance:
- A: Weight 1.0 (highest priority, e.g., titles)
- B: Weight 0.4 (high priority, e.g., headings)
- C: Weight 0.2 (medium priority, e.g., abstracts)
- D: Weight 0.1 (lowest priority, e.g., body text)
Example
Article.search_weighted("crystal", {
title: FullTextSearch::Weight::A, # Most important
subtitle: FullTextSearch::Weight::B,
content: FullTextSearch::Weight::D, # Least important
})
Defined in:
pg-orm/full_text_search.crEnum Members
-
A =
0 -
B =
1 -
C =
2 -
D =
3
Instance Method Summary
-
#a?
Returns
trueif this enum value equalsA -
#b?
Returns
trueif this enum value equalsB -
#c?
Returns
trueif this enum value equalsC -
#d?
Returns
trueif this enum value equalsD - #to_char : Char