pysolr icon indicating copy to clipboard operation
pysolr copied to clipboard

Unknown operation for the an atomic update with pysolr-3.9.0

Open TomeCirun opened this issue 1 year ago • 2 comments

I have

  • [x] Tested with the latest release
  • [ ] Tested with the current master branch
  • [x] Searched for similar existing issues

Actual behaviour

While trying to insert dataset I'm getting this error:

2022-07-22 18:10:43,208 ERROR [ckan.lib.search] Error while indexing dataset 87d3efd7-ef1c-43b4-b805-2ade2ab9d2b8: SearchIndexError('Solr returned an error: Solr responded with an error (HTTP 400): [Reason: Error:[doc=dc6fb4e7feeabffcb8ce037697ab1e83]  Unknown operation for the an atomic update: publication_date]')
Solr returned an error: Solr responded with an error (HTTP 400): [Reason: Error:[doc=dc6fb4e7feeabffcb8ce037697ab1e83]  Unknown operation for the an atomic update: publication_date]

This only happens when using pysolr 3.9.0 , everything works fine with pysolr 3.6.0 I believe the error comes from this line when the solrapi is set to JSON, if the solrapi is set to XML it works like a charm.

Here you can find the 'index' logic https://github.com/ckan/ckan/blob/0a596b8394dbf9582902853ad91450d2c0d7959b/ckan/lib/search/index.py

Here you can find the schema.xml: https://github.com/ckan/ckan/blob/master/ckan/config/solr/schema.xml

Configuration

  • Operating system version: macOS Monterrey 12.4
  • Search engine version: 8.11.1
  • Python version: 3.9.12
  • pysolr version: 3.9.0

TomeCirun avatar Jul 22 '22 17:07 TomeCirun

@acdha any suggestion/workaround about this one ?

Thanks

TomeCirun avatar Aug 05 '22 10:08 TomeCirun

@TomeCirun This is a bit late but you can try using the beta release "pysolr==3.10.0b0" for using atomic updates. I have been using the beta release for some months now and haven't run into any issues.

craig-matadeen avatar Dec 05 '22 10:12 craig-matadeen