Skip to content

Commit

Permalink
Merge 4952df5 into c488971
Browse files Browse the repository at this point in the history
  • Loading branch information
ewlarson committed Feb 24, 2021
2 parents c488971 + 4952df5 commit b35812c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions lib/geo_combine/geo_blacklight_harvester.rb
Expand Up @@ -34,6 +34,10 @@ def document_transformer
document.delete('_version_')
document.delete('score')
document.delete('timestamp')
document.delete('solr_bboxtype__minX')
document.delete('solr_bboxtype__minY')
document.delete('solr_bboxtype__maxX')
document.delete('solr_bboxtype__maxY')
document
end
end
Expand Down
6 changes: 3 additions & 3 deletions spec/lib/geo_combine/geo_blacklight_harvester_spec.rb
Expand Up @@ -49,7 +49,7 @@
describe 'document tranformations' do
let(:docs) do
[
{ layer_slug_s: 'abc-123', _version_: '1', timestamp: '1999-12-31', score: 0.1 },
{ layer_slug_s: 'abc-123', _version_: '1', timestamp: '1999-12-31', score: 0.1, solr_bboxtype__minX: -87.324704, solr_bboxtype__minY: 40.233691, solr_bboxtype__maxX: -87.174404, solr_bboxtype__maxY: 40.310695 },
{ layer_slug_s: 'abc-321', dc_source_s: 'abc-123' }
]
end
Expand All @@ -68,7 +68,7 @@
expect(stub_solr_connection).to receive(:update).with(
hash_including(
data: [
{ layer_slug_s: 'abc-123', timestamp: '1999-12-31', score: 0.1 },
{ layer_slug_s: 'abc-123', timestamp: '1999-12-31', score: 0.1, solr_bboxtype__minX: -87.324704, solr_bboxtype__minY: 40.233691, solr_bboxtype__maxX: -87.174404, solr_bboxtype__maxY: 40.310695 },
{ layer_slug_s: 'abc-321', dc_source_s: 'abc-123' }
].to_json
)
Expand All @@ -79,7 +79,7 @@
end

context 'when no transformer is set' do
it 'removes the _version_, timestamp, and score fields' do
it 'removes the _version_, timestamp, score, and solr_bboxtype__* fields' do
expect(stub_solr_connection).to receive(:update).with(
hash_including(
data: [
Expand Down

0 comments on commit b35812c

Please sign in to comment.