[ckan-dev] solved problem after activating solr with spatial search (ckanext-spatial)
Armin Retterath
armin.retterath at gmail.com
Thu Mar 2 09:13:57 UTC 2017
hi together,
there is a little problem when enabling ckanext-spatial with spatial
queries under ckan 2.5.4 - ubuntu 14.04 (solr 3.6.2 - default package):
after installing and activating the extension, the solr schema.xml has to
be adopted. after the adoption, the index has to be rebuild.
if you first delete the solr caches (after /etc/init.d/jetty restart) with:
curl http://localhost:8983/solr/update --data
'<delete><query>*:*</query></delete>' -H 'Content-type:text/xml;
charset=utf-8'
curl http://localhost:8983/solr/update --data '<commit/>' -H
'Content-type:text/xml; charset=utf-8'
and then try to do
paster --plugin=ckan search-index rebuild
–config=/etc/ckan/default/development.ini
it gives an following error:
Traceback (most recent call last):
File "/usr/lib/ckan/default/bin/paster", line 11, in <module>
sys.exit(run())
File
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py",
line 102, in run
invoke(command, command_name, options, args[1:])
File
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py",
line 141, in invoke
exit_code = runner.run(args)
File
"/usr/lib/ckan/default/local/lib/python2.7/site-packages/paste/script/command.py",
line 236, in run
result = self.command()
File "/data/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 459, in
command
self.rebuild()
File "/data/ckan/lib/default/src/ckan/ckan/lib/cli.py", line 476, in
rebuild
rebuild(self.args[1])
File "/data/ckan/lib/default/src/ckan/ckan/lib/search/__init__.py", line
157, in rebuild
{'id': package_id})
File "/data/ckan/lib/default/src/ckan/ckan/logic/__init__.py", line 416,
in wrapped
result = _action(context, data_dict, **kw)
File "/data/ckan/lib/default/src/ckan/ckan/logic/action/get.py", line
1026, in package_show
raise NotFound
ckan.logic.NotFound
the only solution i found was to use the rebuild_fast option:
paster --plugin=ckan search-index rebuild_fast
–config=/etc/ckan/default/development.ini
i don't understand why, but it works ;-)
maybe someone can update the documentation for ckanext-spatial?
best regards from germany,
armin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20170302/d28d49c8/attachment-0002.html>
More information about the ckan-dev
mailing list