Class: Workarea::Search::RelatedProducts

Inherits:
Object
  • Object
show all
Includes:
LoadProductResults, ProductDisplayRules, Query
Defined in:
app/queries/workarea/search/related_products.rb

Instance Method Summary collapse

Methods included from ProductDisplayRules

#active_for_segments_clause, #displayable_when_out_of_stock_sort_clause, #inventory_display_clause, #preview_current_release_clause, #product_display_query_clauses

Methods included from LoadProductResults

#load_inventory_from, #load_model_from, #load_pricing_from

Methods included from Query

#additional_options, #aggregations, #body, #id, #initialize, #load_model_from, #loaded_results, #post_filter, #query_string, #response, #results, #scroll, #stats, #total

Instance Method Details

#queryObject



10
11
12
13
14
15
16
17
18
19
# File 'app/queries/workarea/search/related_products.rb', line 10

def query
  {
    bool: {
      must: product_display_query_clauses(allow_displayable_when_out_of_stock: false) +
              more_like_this_query_clauses +
              primary_navigation_query_clauses +
              exclusion_query_clauses
    }
  }
end

#sizeObject



21
22
23
# File 'app/queries/workarea/search/related_products.rb', line 21

def size
  10
end