Candidate generators are the p-search entities that enumerate the elements of the search. Unlike tools like grep, p-search requires everything that will be searched to be enumerated upfront. This is because p-search is not inherently tied to the running of any specific tool and so a starting point needs to be established.
The documents that candidate generators provide are essentially sets of key-value pairs. It is the various properties on the document that determines the type of operations which can be performed. For example, if you are searching for Elisp function symbols, you won’t be able to search by Git Author. The inner workings of candidate generators and how to create them will be explained in the section on writing extensions, Creating Candidate Generators.