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

Validity date filter for reference search #78

Closed saulius closed 11 years ago

saulius commented 11 years ago

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

Our synonyms (references) search didn't take into account validity date of the referenced chapter/heading that is why it was suggesting exipred (by search issue date) records. This was fixed along with duplicate removal and correct ordering.

After deployment we should not be seeing most popular heading suggestion 2851 which has validity end date of 31st Dec 2006 (here https://www.gov.uk/trade-tariff/search?utf8=%E2%9C%93&q=trade_tariff&t=water&button=&day=20&month=3&year=2013&country=). But we should still be seeing it before validity end date time, e.g.: https://www.gov.uk/trade-tariff/search?utf8=%E2%9C%93&q=trade_tariff&t=water&button=&day=20&month=3&year=2005&country=.

Also we should not be seeing duplicate chapters here https://www.gov.uk/trade-tariff/search?utf8=%E2%9C%93&q=trade_tariff&t=alloy&button=&day=20&month=3&year=2014&country= and they should be sorted in correct order.

This change requires reindexing task to be run after deploy.