[ckan-discuss] Problems with Solr searching inside a Dataset ("can not sort on undefined field: metadata_modified")

Francisco Javier Huerta Lopez fhuertal at sct.gob.mx
Mon Aug 19 22:21:56 BST 2013


Hello all. This is my first post, I just recently installed CKAN. We are planning to start using the software in our government agency, and want to get a prototype up and running in order to see how our data would show up.

I followed the instructions pretty closely, on Ubuntu 12.04, using the package install. I had a couple of issues - nothing major. But when I got to the Solr / Postgres part, I had some issues - specifically, with the 2.0 Schema. I followed the instructions outlined here: http://lists.okfn.org/pipermail/ckan-dev/2013-March/004290.html symlinking the correct (2.0) file and generating the database using sudo ckan db init

Everything seems fine. I got a SUCCESS ending message.

The problem here is - whenever I do a search on my part, I always get the following error on my Apache log:

-----
[Mon Aug 19 13:51:27 2013] [error] 2013-08-19 13:51:27,249 ERROR [ckan.controllers.package] Dataset search error: ('SOLR returned an error running query: {\\'sort\\': u\\'score desc, metadata_modified desc\\', \\'fq\\': [\\'+dataset_type:dataset capacity:"public" +site_id:"default" +state:active\\'], \\'facet.mincount\\': 1, \\'rows\\': 21, \\'facet.field\\': [\\'organization\\', \\'groups\\', \\'tags\\', \\'res_format\\', \\'license_id\\'], \\'facet.limit\\': \\'50\\', \\'mm\\': \\'2<-1 5<80%\\', \\'facet\\': \\'true\\', \\'q\\': u\\'datos\\', \\'start\\': 0, \\'wt\\': \\'json\\', \\'qf\\': \\'name^4 title^4 tags^2 groups^2 text\\', \\'tie\\': \\'0.1\\', \\'fl\\': \\'id data_dict\\', \\'defType\\': \\'dismax\\'} Error: \\'can not sort on undefined field: metadata_modified\\'',)
[Mon Aug 19 13:51:27 2013] [error] 2013-08-19 13:51:27,301 INFO  [ckan.lib.base]  /dataset render time 0.087 seconds
[Mon Aug 19 13:51:27 2013] [error] 2013-08-19 13:51:27,750 INFO  [ckan.lib.base]  /api/i18n/en render time 0.004 seconds
[Mon Aug 19 13:54:24 2013] [error] 2013-08-19 13:54:24,616 ERROR [ckan.controllers.package] Dataset search error: ('SOLR returned an error running query: {\\'sort\\': u\\'score desc, metadata_modified desc\\', \\'fq\\': [\\'+dataset_type:dataset capacity:"public" +site_id:"default" +state:active\\'], \\'facet.mincount\\': 1, \\'rows\\': 21, \\'facet.field\\': [\\'organization\\', \\'groups\\', \\'tags\\', \\'res_format\\', \\'license_id\\'], \\'facet.limit\\': \\'50\\', \\'mm\\': \\'2<-1 5<80%\\', \\'facet\\': \\'true\\', \\'q\\': u\\'datos\\', \\'start\\': 0, \\'wt\\': \\'json\\', \\'qf\\': \\'name^4 title^4 tags^2 groups^2 text\\', \\'tie\\': \\'0.1\\', \\'fl\\': \\'id data_dict\\', \\'defType\\': \\'dismax\\'} Error: \\'can not sort on undefined field: metadata_modified\\'',)
-----

And I get the following message on my front end:

-----
Sorry no datasets found for "XXX"

Please try another search.

There was an error while searching. Please try again.

-----



I mention the Solr schema issue because I believe that's the part where my problems started (and the only step where I think I had issues with the install). I suppose there's something wrong with my database schema, but have no clue as to how to start troubleshooting. Any help will be greatly appreciated!


Javier.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-discuss/attachments/20130819/fecd79aa/attachment.htm>


More information about the ckan-discuss mailing list