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

59667324 use elasticsearch gem #138

Closed saulius closed 10 years ago

saulius commented 10 years ago

This change is for https://www.pivotaltracker.com/story/show/59667324

Since Tire is being retired we moved to official Ruby Elasticsearch client.

As a result we have less complex code. Indexing code isn't so tightly coupled to Sequel model code. We can also run any Elasticsearch query or their combination - no need to wait for Tire add new query types. We now use multi query search endpoint to perform our search and save 4 http requests.

This also makes section search work, sections aren't being found at the moment: https://www.gov.uk/trade-tariff/search?utf8=%E2%9C%93&q=trade_tariff&t=animal+products&button=&day=20&month=1&year=2014&country= doesn't contain Section 1 "Live animals; animal products".

Depends on:

matthewford commented 10 years ago

@sauliusg can we remove 1.9 from travis as it's failing