The R&D Christmas Project: Tesco.com Grocery Instant
That’s it! The final group of customers are having their groceries delivered before Christmas as this entry publishes – and once again they have entrusted us with delivering their Christmas Day dinner.
Yes, Tesco.com grocery customers have once again trusted us provide the ingredients for their most important meal of the year. It’s a huge honour and a huge responsibility. The weather hasn’t exactly helped but staff across the country are doing their best for customers this evening.
So finally I can draw breath and begin the process of planning the delivery of some exciting projects for the coming three months.
However, during the three working days of next week I’m not going to work. I’m going to play! I love working between Christmas and New Year because the office is mostly empty and the phone rarely rings. It’s the opportunity to start and finish a small proof of concept quickly, so let me explain it:
I love Google Instant, where search results start appearing with each key press (and it’s not just the fact that Tesco has the kudos of being the first thing Google thinks of when I type ‘t’!). So next week I’m going to publish a proof of concept called, unless I think of a better name, Tesco.com Grocery Instant.
The objective is simple: on a web page running on our R&D server you start typing in a grocery product name. At the first key press, grocery product search results instantly appear that become more relevant with each subsequent key press. Could a user of this service find the product they are seeking more quickly than standard text search or following the department / aisle / shelf taxonomy?
To make it work I intend to follow these steps:
Take a copy of our product range and import it into a SQL database server table.
Create a second ‘index’ table which will have, in its first rows, a single letter of the alphabet and all the product ids from the first table that have that letter in their descriptions. I’ll write a process that will carefully examine each product description and choose whether to add it to this ‘index’. In total for this part I will look for characters a-z and numbers 0-9.
Continue the indexing, this time adding “aa” and finding all the products that match, then “ab”, “ac”, etc through to “zz” – that’s 26 x 26 letter combinations (no need for digits) = 676.
Continue the indexing, this time adding triple letters from “aaa” to “zzz” and finding all the products that match, That’s 26 x 26 x 26 letter combinations = 17,576.
Continue the indexing, this time adding four-letter combinations from “aaaa” to “zzzz” and finding all the products that match, That’s 26 x 26 x 26 x2 6 letter combinations = 456,976.
By doing this, you should always get an instant response from the database because there is always a spot-on data match for each key press as the SQL server engine searches for the correct products.
Hopefully by the time you have reached four characters then the instant product listing should have narrowed down to a reasonably small number of products. If not I’ll simply go to five-letter combinations which will add another 11,881,376 such combinations to the database.
As ever I’ll put this proof of concept onto our public internet facing labs server so you can have a go. Stay tuned to see how you can access the page.
In the meantime, may I wish you and your loved ones Yuletide Greetings and leave you with this seasonal message: On December 25th a saviour was born. He revealed eternal truth, bringing joy to millions. He astonished the world with his command of nature. He changed history forever. Yes Happy Birthday Sir Isaac Newton, born 25 December 1642.