alphagov / trade-tariff-backend

Enabling the population and distribution via API of UK Customs tariffs and duties
MIT License
7 stars 6 forks source link

If search term contains no letters, extract the digits for search. #45

Closed saulius closed 11 years ago

saulius commented 11 years ago

This solves https://www.pivotaltracker.com/story/show/41385309 and https://www.pivotaltracker.com/story/show/41385647.

Also I had no ElasticSearch search indexes on my new VM so I had a runtime error from delegation to nil, so I fixed that as well along the way.

matthewford commented 11 years ago

We should ideally also do a partial match i.e if providing an odd number we round down. So it works with any number separated by non alphabetical chars

saulius commented 11 years ago

That should work now to, e.g. '0!1%#$0,.1' will get you to Live Horses heading (0101).