pysolr
pysolr copied to clipboard
Unknown operation for the an atomic update with pysolr-3.9.0
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
@acdha any suggestion/workaround about this one ?
Thanks
@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.