I need to join another model (GeoNameAlternateName) and try it according to the document. But for some reason, I get the following error:
ArgumentError: Unknown field option :prefix provided for field :name
My GeoNameCityModel is searchable as follows:
searchable do
text :name
string :feature_class
string :feature_code
latlon(:lonlat) { Sunspot::Util::Coordinates.new(lat, lon) }
join(:name, :prefix => "alternate", :target => GeoNameAlternateName, :type => :text, :join => { :from => :geonames_id, :to => :geonames_id })
end
Do both models have a field column? Could this intervene?
I work on mac osx, rails 4.1.8, ruby-2.1.1 / gems / sunspot _solr-2.1.1 / Solr Solr-specifications 4.2.0.2013.03.06.22.32.13.13 Solr-implementation 4.2.0 1453694 - rmuir - 2013-03-06 22:32:13 Lucene specs 4.2.0 Lucene implementation 4.2.0 1453694 - rmuir - 2013-03-06 22:25:29
source
share