An inverted file, as described in this chapter, is just a collection of inverted lists.
To search the index, some kind of data structure is necessary to find the inverted
list for a particular term. The simplest way to solve this problem is to store each
inverted list as a separate file, where each file is named after the corresponding
search term. To find the inverted list for “dog,” the system can simply open the file
named dog and read the contents. However, as we saw in Chapter 4, document
collections can have millions of unique words, and most of these words will occur
only once or twice in the collection. This means that an index, if stored in files,
would consist of millions of files, most of which are very small.