Module: Card::Query::SqlStatement::FullTextOrdering

Included in:
Card::Query::SqlStatement
Defined in:
lib/card/query/card_query/full_text_matching.rb

Overview

handle ‘fulltext_match` relevance sorting in card queries

Instance Method Summary collapse

Instance Method Details

#orderObject

when there is full text matching in the where clause, the default ordering is by relevance, so we just need to make sure there is no explicit order by clause



30
31
32
# File 'lib/card/query/card_query/full_text_matching.rb', line 30

def order
  super unless "relevance".in? [@mods[:sort_by], @mods[:sort]]
end