pycsw icon indicating copy to clipboard operation
pycsw copied to clipboard

Harvest fails when trying to insert record with long abstract

Open igor-chernikov opened this issue 9 years ago • 4 comments

Description

Inserting record with long abstract causes the error:

ExceptionReport: 'Harvest (insert) failed: ERROR: index row size 2984 exceeds maximum 2712 for index "ix_records_abstract"\nHINT: Values larger than 1/3 of a buffer page cannot be indexed.\nConsider a function index of an MD5 hash of the value, or use full text indexing.\n.'

Sample record: http://geobretagne.fr/geonetwork/srv/eng/csw?service=CSW&version=2.0.2&request=GetRecordById&id=b5cb375d-7bb5-4b75-84f7-649e8f84e0dd

Environment

  • operating system:
  • Python version: 2.7.10
  • pycsw version: master
  • source/distribution
    • [x] git clone
    • [ ] DebianGIS/UbuntuGIS
    • [ ] PyPI
    • [ ] zip/tar.gz
    • [ ] other (please specify):
  • web server
    • [x] Apache/mod_wsgi
    • [ ] CGI
    • [ ] other (please specify):

Steps to Reproduce

Sample code using owslib:

from owslib import csw
client = csw.CatalogueServiceWeb('http://localhost:9000/')  # pycsw url
client.harvest('http://geobretagne.fr/geonetwork/srv/eng/csw', 'http://www.opengis.net/cat/csw/2.0.2')

Additional Information

igor-chernikov avatar Oct 04 '16 05:10 igor-chernikov

@igor-chernikov thanks for the report, can you please include the database information?

kalxas avatar Oct 04 '16 09:10 kalxas

@kalxas, sure, excuse me for not mentioning that earlier. I'm using PostgreSQL 9.5 with PostGIS 2.2

igor-chernikov avatar Oct 04 '16 10:10 igor-chernikov

It seems that you hit the index limit for the specific field. A workaround would be to drop that index completely. If you have full text search enabled, you will still be able to search your catalog through free text search.

kalxas avatar Oct 05 '16 09:10 kalxas

@kalxas thanks for your response. I used exactly this workaround.

igor-chernikov avatar Oct 06 '16 05:10 igor-chernikov