Module: ParadeDB::SearchMethods::FacetRelation

Defined in:
lib/parade_db/search_methods.rb

Overview

Module to add .facets accessor to relations

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#_paradedb_facet_fieldsObject

Returns the value of attribute _paradedb_facet_fields.



1090
1091
1092
# File 'lib/parade_db/search_methods.rb', line 1090

def _paradedb_facet_fields
  @_paradedb_facet_fields
end

Instance Method Details

#facetsObject



1097
1098
1099
1100
# File 'lib/parade_db/search_methods.rb', line 1097

def facets
  validate_facet_query_shape!
  @_facets_cache ||= extract_facets_from_results
end

#loadObject



1092
1093
1094
1095
# File 'lib/parade_db/search_methods.rb', line 1092

def load(*)
  validate_facet_query_shape!
  super
end