anchor.diff:      (unless (member packages exclude-packages :key #'find-package)
         (index-package p))))
   
  +(defun indexed-packages ()
  +  (collectors:with-collector-output (rtn)
  +    (%docs-for-term
  +     :type :package
  +     (lambda (d) (rtn (intern (doc-value d :name) :keyword))))))
  +
   (defun get-doc (idx)
     "Get a document for the thing passed in"
     (etypecase idx
       (montezuma:document idx)
  -    (integer
  +    ((or integer montezuma::term string)
        (ignore-errors
         (montezuma:get-document *cl-doc-index* idx)))))
  +
  +(defun %docs-for-term (n v fn)
  +  (let* ((term (make-term n v))
  +         (docs (montezuma::term-docs-for (montezuma:reader *cl-doc-index*) term)))
  +    (when docs
  +      (unwind-protect
  +           (iter
  +             (while (montezuma::next? docs))
  +             (funcall fn (get-doc (montezuma::doc docs))))
  +        (montezuma::close docs)))))
  +
  +(defun docs-for-term (n v)
  +  (collectors:with-collector-output (rtn)
  +    (%docs-for-term n v #'rtn)))
  +
  +(defun print-docs-for-term (n v &optional (stream t))
  +  (iter (for d in (docs-for-term n v))
  +    (print-doc d stream)))
   
   (defun doc-value (idx field
                     &aux
  
positive.code:   (:shadowing-import-from :alexandria :ensure-list)
    (:export
     :index-package
     :index-pacakges
     :search-manifest
     :print-index-contents
     ))
  
  (in-package :manifest-search)
  
  (defparameter *cl-doc-index*
    (make-instance
     'montezuma:index
     :default-field "*"))
  
  (defun join-strings (list
                       &optional (delim ", ")
                       (ignore-empty-strings-and-nil t))
    (collectors:with-string-builder-output
        (collect :delimiter delim
          :ignore-empty-strings-and-nil ignore-empty-strings-and-nil)
      (iter (for i in (ensure-list list)) (collect (%to-s i)))))
  
  (defun doc-fn (type)
    "Try to find a specific make-doc function, failing that return make-default-doc"
    (handler-case
        (fdefinition (intern (format nil "MAKE-~A-DOC" type) :manifest-search))
      (undefined-function ()
        #'make-default-doc)))
  
  (defun doc-with-fields (&rest fields)
    "A shortcut for making a new montezuma document with field data"
    (let ((doc (make-instance 'montezuma:document)))
      (iter (for f in fields)
        (when f (montezuma:add-field doc f)))
      doc))
  
  (defun %to-s (thing)
    "Turns whatever we were given into an indexable string"
  
negative.code:     (list (join-strings thing))
      (t (princ-to-string thing))))
  
  (defparameter +index-path+ #P"~/lisp/doc-index")
  
  (defvar *cl-doc-index* )
  
  (defun load-index ()
    (unless *cl-doc-index*
      (setf *cl-doc-index*
            (make-instance
             'montezuma:index
             :path +index-path+
  
             ;; :create-p T
             :create-if-missing-p T
     
             :default-field "*"
             :fields (mapcar #'%to-s '(:name :nicknames :type :package :documentation :readme))
             ))))
  
  (load-index)
  
  (defun close-index ()
    (montezuma:flush *cl-doc-index*)
    (montezuma:close *cl-doc-index*)
    (setf *cl-doc-index* nil))
  
  
  (defun doc-fn (type)
    "Try to find a specific make-doc function, failing that return make-default-doc"
    (handler-case
        (fdefinition (intern (format nil "MAKE-~A-DOC" type) :manifest-search))
      (undefined-function ()
        #'make-default-doc)))
  
  (defun doc-with-fields (&rest fields)
    "A shortcut for making a new montezuma document with field data"
    (let ((doc (make-instance 'montezuma:document)))
      (iter (for f in fields)
        (when f (montezuma:add-field doc f)))
      doc))
  
  (defun make-field (name value &optional
                                (tokenize? t))
    (montezuma:make-field
     (%to-s name)
     (%to-s value)
     :index (if tokenize? :tokenized :untokenized)))
  
  (defun make-default-doc (thing
                           &optional type package
  