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.



1030
1031
1032
# File 'lib/parade_db/search_methods.rb', line 1030

def _paradedb_facet_fields
  @_paradedb_facet_fields
end

Instance Method Details

#facetsObject



1037
1038
1039
1040
# File 'lib/parade_db/search_methods.rb', line 1037

def facets
  validate_facet_query_shape!
  @_facets_cache ||= extract_facets_from_results
end

#loadObject



1032
1033
1034
1035
# File 'lib/parade_db/search_methods.rb', line 1032

def load(*)
  validate_facet_query_shape!
  super
end