In the case I mentioned above, the company wanted me to build a search engine before elastic search existed, and before there was full-text search in popular dbs like Postgres or MySQL. The CTO/founder gave me his credit card and told me to buy whatever books I needed. I bought about 5 different relevant books. Work days were about 10-12hrs, they still wanted me to read/research on my own time