Wiring in BooksRepository and factory to create IndexWriter dependency