[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
Tue Aug 20 18:30:58 BST 2013
Hello Adria. Thanks for your answer.
Yes. When I open the URL you gave me, it opens the correct (CKAN 2.0) schema.
I did restart jetty.
The strange thing here is - I noticed something. When I start a search from the main screen, I get the error message I posted. BUT - when I start a search from the search screen, there's no error generated.
I'll do a couple more tests, but so far, it seems to be a very strange issue indeed. I'd expect search to fail everywhere.
Javier.
-----Original Message-----
From: Adrià Mercader [mailto:adria.mercader at okfn.org]
Sent: Tuesday, August 20, 2013 5:24 AM
To: Francisco Javier Huerta Lopez
Cc: ckan-discuss at lists.okfn.org
Subject: Re: [ckan-discuss] Problems with Solr searching inside a Dataset ("can not sort on undefined field: metadata_modified")
Hi Javier,
This looks indeed as a problem with the CKAN Solr schema (not the db
one) not being picked up.
What file do you see if you request
http://localhost:8983/solr/admin/file/?file=schema.xml
Is it the CKAN one? It should begin with <schema name="ckan" version="2.0">
Did you restart jettty (sudo service jetty restart) after creating the symlink?
Hope this helps,
Adrià
On 19 August 2013 22:21, Francisco Javier Huerta Lopez <fhuertal at sct.gob.mx> wrote:
> 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.
>
>
>
>
> _______________________________________________
> ckan-discuss mailing list
> ckan-discuss at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-discuss
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-discuss
>
More information about the ckan-discuss
mailing list