Class: Celsius::Primo::SoapApi::Searcher::SearchBrief::SearchResultTransformation::RemoveBogusCreationdateFacets

Inherits:
Transformation::Step
  • Object
show all
Defined in:
lib/celsius/primo/soap_api/searcher/search_brief/search_result_transformation/remove_bogus_creationdate_facets.rb

Instance Method Summary collapse

Instance Method Details

#callObject

Sometimes, there are creationdate facets entries 1 and 500, which are bogus



10
11
12
13
14
# File 'lib/celsius/primo/soap_api/searcher/search_brief/search_result_transformation/remove_bogus_creationdate_facets.rb', line 10

def call
  ((target["facets"]["facet_creationdate"] || {})["terms"] || []).reject! do |element|
    element["term"] == "1" || element["term"] == "500"
  end
end