enum PgORM::FullTextSearch::Weight

Overview

Column weights for full-text search ranking.

PostgreSQL assigns different weights to text based on importance:

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.cr

Enum Members

A = 0
B = 1
C = 2
D = 3

Instance Method Summary

Instance Method Detail

def a? #

Returns true if this enum value equals A


[View source]
def b? #

Returns true if this enum value equals B


[View source]
def c? #

Returns true if this enum value equals C


[View source]
def d? #

Returns true if this enum value equals D


[View source]
def to_char : Char #

[View source]