(append {:keys [id-fn id-path] :as db} docs doc-emission-strs)
Appends a doc to the index, returns the updated database value.
Appends a doc to the index, returns the updated database value.
(create-index filename id-fn & [skip-first?])
Builds up an index of Entity IDs as keys (IDs extracted with id-fn), and as value a vector with 2 values:
Builds up an index of Entity IDs as keys (IDs extracted with id-fn), and as value a vector with 2 values: - the start index in the text file to start read EDN for the input doc - the length in bytes input doc
(index-id & {:keys [filename id-fn]})
This function generates a pseudo unique index ID for the combination of the ID function and the filename.
This function generates a pseudo unique index ID for the combination of the ID function and the filename.
(re-index log-limit db)
Re-index the database, with a limit on the log size. Ie. :log-limit set to 2 means only the 2 first lines of the database are considered. If a newer version of one of the docs were added later, they are not taken into account.
Re-index the database, with a limit on the log size. Ie. :log-limit set to 2 means only the 2 first lines of the database are considered. If a newer version of one of the docs were added later, they are not taken into account.
(reader db)
Returns a BufferedReader of the database index. Use this in a with-open block (or close it explicitly when done)!
Returns a BufferedReader of the database index. Use this in a with-open block (or close it explicitly when done)!
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close