Update .gitignore
Add util file with common functions, and refactor indexing
Start wiring in search
Rename search->retrieve