Skip to content

Commit

Permalink
Merge pull request #285 from vrk-kpa/remove_coupled_resources_from_so…
Browse files Browse the repository at this point in the history
…lr_index

Remove coupled resources from solr
  • Loading branch information
amercader authored Jul 6, 2022
2 parents f00ad5b + d00d6be commit cd6667d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ckanext/spatial/plugin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,14 @@ def before_dataset_index(self, pkg_dict):

pkg_dict['spatial_geom'] = wkt

# Coupled resources are URL -> uuid links, they are not needed in SOLR
# and might be huge if there are lot of coupled resources
if pkg_dict.get('coupled-resource'):
pkg_dict.pop('coupled-resource')

# spatial field is geojson coordinate data, not need in SOLR either
if pkg_dict.get('spatial'):
pkg_dict.pop('spatial')

return pkg_dict

Expand Down

0 comments on commit cd6667d

Please sign in to comment.