I am Using SunSpot Solr for Searching text and zip codes through my application. I am searching through the model like below,
searchable do
text :city
integer :zip
end
def self.search_with_solr(search_word)
search = Hometown.solr_search do
fulltext(search_word)
end
search.results
end
Whenever I search through for zip codes and city (eg. 123 and blah) it returns me result, But if I search for zips that start with 0 (eg. 001243) it doesnt return me the result.
I guess configuration needs to be changed in schema.xml. I tried Every combination but in vein. Would be obliged if I get a quick response.