Return a recipe that can be used to replay this search.
The recipe allows reconstruction of the same results at a later date
without knowing all the found keys. The essential elements are a list
of keys to start and to stop at. In order to give reproducible
results when ghosts are encountered by a search they are automatically
added to the exclude list (or else ghost filling may alter the
results).
| Returns | A tuple ('search', start_keys_set, exclude_keys_set,
revision_count). To recreate the results of this search, create a
breadth first searcher on the same graph starting at start_keys.
Then call next() (or next_with_ghosts()) repeatedly, and on every
result, call stop_searching_any on any keys from the exclude_keys
set. The revision_count value acts as a trivial cross-check - the
found revisions of the new search should have as many elements as
revision_count. If it does not, then additional revisions have been
ghosted since the search was executed the first time and the second
time. |