Sunspot geospatial search ERROR:unknown field 'location_ll'

ⅰ亾dé卋堺 提交于 2019-12-05 20:01:28

Make sure schema.xml in the solr folder matches the latest one from here:

https://github.com/sunspot/sunspot/blob/master/sunspot_solr/solr/solr/conf/schema.xml

Still not working on my localhost, but it is on production

If you're using websolr you'll need to make sure you set your index type to Sunspot 2.0 for Ruby on Rails (Solr 3). Mine was defaulted to Sunspot 1.3.x for Ruby on Rails, and this was causing the unknown field 'location_ll' error.

I'm using the Heroku addon, and for that you can set the index type by running:

$ heroku addons:open websolr 

Then clicking on your index (probably default), and selecting from the drop down and hitting change:

Also make sure that schema.xml is loaded from your solr directory, not from default's gem's directory.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!