After doing research in many libraries, I noticed the books' ID contain a lot useful information. It is the sole identification of the books' categories. So I took the books' ID as the primary search key, categorized the books into different files, before adding a secondary search index to each category, according to which we could easily retrieve the information of the books.