[openspending-dev] SolrException: HTTP code=400, reason=undefined field dataset

Vitor Baptista vitor at vitorbaptista.com
Fri Dec 7 14:39:35 UTC 2012


I found the problem. In the install instructions, there was:


$ cp -R apache-solr-3.5.0/example ./solr/

But it should be:


$ cp -R apache-solr-3.5.0/* ./solr/


I've updated the instructions, including to use 3.6.1, as 3.5.0 is
unavailable. All tests still pass.

How do I recreate http://docs.openspending.org?

2012/12/7 Vitor Baptista <vitor at vitorbaptista.com>

> Yep. I'm downloading solr 3.5 to test now. I was using 3.6.1, that's the
> oldest available in http://www.apache.org/dyn/closer.cgi/lucene/solr/.
> Maybe the schema.xml schema changed.
>
>
> 2012/12/7 Friedrich Lindenberg <friedrich.lindenberg at okfn.org>
>
>> Did you actually set up the schema.xml file in the solr core you're
>> using?
>>
>> - Fr.
>>
>>
>> On Thu, Dec 6, 2012 at 9:15 PM, Vitor Baptista <vitor at vitorbaptista.com>wrote:
>>
>>> Hi,
>>>
>>> I've done a fresh OpenSpending install and everything seems to work,
>>> except Solr. Have anyone seen this error before? Stack trace attached.
>>>
>>> Cheers,
>>> Vítor.
>>>
>>> URL: http://localhost:5000/working/editor
>>>> File
>>>> '/home/vagrant/openspending/pyenv/local/lib/python2.7/site-packages/weberror/evalexception.py',
>>>> line 431 in respond
>>>>   app_iter = self.application(environ, detect_start_response)
>>>> File
>>>> '/home/vagrant/openspending/pyenv/local/lib/python2.7/site-packages/repoze/who/middleware.py',
>>>> line 87 in __call__
>>>>   app_iter = app(environ, wrapper.wrap_start_response)
>>>> File
>>>> '/home/vagrant/openspending/pyenv/local/lib/python2.7/site-packages/beaker/middleware.py',
>>>> line 73 in __call__
>>>>   return self.app(environ, start_response)
>>>> File
>>>> '/home/vagrant/openspending/pyenv/local/lib/python2.7/site-packages/beaker/middleware.py',
>>>> line 155 in __call__
>>>>   return self.wrap_app(environ, session_start_response)
>>>> File
>>>> '/home/vagrant/openspending/pyenv/local/lib/python2.7/site-packages/routes/middleware.py',
>>>> line 131 in __call__
>>>>   response = self.app(environ, start_response)
>>>> File
>>>> '/home/vagrant/openspending/pyenv/local/lib/python2.7/site-packages/pylons/wsgiapp.py',
>>>> line 107 in __call__
>>>>   response = self.dispatch(controller, environ, start_response)
>>>> File
>>>> '/home/vagrant/openspending/pyenv/local/lib/python2.7/site-packages/pylons/wsgiapp.py',
>>>> line 312 in dispatch
>>>>   return controller(environ, start_response)
>>>> File '/home/vagrant/openspending/openspending/ui/lib/base.py', line 74
>>>> in __call__
>>>>   return WSGIController.__call__(self, environ, start_response)
>>>> File
>>>> '/home/vagrant/openspending/pyenv/local/lib/python2.7/site-packages/pylons/controllers/core.py',
>>>> line 211 in __call__
>>>>   response = self._dispatch_call()
>>>> File
>>>> '/home/vagrant/openspending/pyenv/local/lib/python2.7/site-packages/pylons/controllers/core.py',
>>>> line 162 in _dispatch_call
>>>>   response = self._inspect_call(func)
>>>> File
>>>> '/home/vagrant/openspending/pyenv/local/lib/python2.7/site-packages/pylons/controllers/core.py',
>>>> line 105 in _inspect_call
>>>>   result = self._perform_call(func, args)
>>>> File
>>>> '/home/vagrant/openspending/pyenv/local/lib/python2.7/site-packages/pylons/controllers/core.py',
>>>> line 57 in _perform_call
>>>>   return func(**args)
>>>> File
>>>> '/home/vagrant/openspending/openspending/ui/controllers/editor.py', line 37
>>>> in index
>>>>   c.index_count = solr.dataset_entries(c.dataset.name)
>>>> File '/home/vagrant/openspending/openspending/lib/solr_util.py', line
>>>> 77 in dataset_entries
>>>>   res = solr.raw_query(q='*:*', fq='dataset:"%s"' % dataset_name,
>>>> rows=0, wt='json')
>>>> File
>>>> '/home/vagrant/openspending/pyenv/local/lib/python2.7/site-packages/solr/core.py',
>>>> line 706 in raw_query
>>>>   return self.select.raw(**params)
>>>> File
>>>> '/home/vagrant/openspending/pyenv/local/lib/python2.7/site-packages/solr/core.py',
>>>> line 822 in raw
>>>>   rsp = conn._post(self.selector, request, conn.form_headers)
>>>> File
>>>> '/home/vagrant/openspending/pyenv/local/lib/python2.7/site-packages/solr/core.py',
>>>> line 639 in _post
>>>>   return check_response_status(self.conn.getresponse())
>>>> File
>>>> '/home/vagrant/openspending/pyenv/local/lib/python2.7/site-packages/solr/core.py',
>>>> line 1096 in check_response_status
>>>>   raise ex
>>>> SolrException: HTTP code=400, reason=undefined field dataset
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> openspending-dev mailing list
>>> openspending-dev at lists.okfn.org
>>> http://lists.okfn.org/mailman/listinfo/openspending-dev
>>> Unsubscribe: http://lists.okfn.org/mailman/options/openspending-dev
>>>
>>>
>>
>>
>> --
>> Friedrich Lindenberg | OpenSpending & OKFN Labs | @pudo
>> http://openspending.org | http://okfnlabs.org | http://pudo.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/openspending-dev/attachments/20121207/083d49d0/attachment.html>


More information about the openspending-dev mailing list