(clear-all-indexes!!)
This should be used with care; it does as advertized!
This should be used with care; it does as advertized!
(clear-index! {:keys [filename]})
Clear an index based on ID function and database filename
Clear an index based on ID function and database filename
(db {:keys [id-fn id-name id-type doc-type filename]
:or {id-type :string}
:as params})
Creates a database var which can be used to perform queries
Creates a database var which can be used to perform queries
(index* filename idx-id)
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 JSON doc., and secondly the length in bytes JSON doc.
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 JSON doc., and secondly the length in bytes JSON doc.
In the form {"filename1" {"9298cvoa" {index-w-first-few-ids-as-str-=-9298cvoa} "filename2" {"ao3oijf8" {index-w-first-few-ids-as-str-=-ao3oijf8}}}
In the form {"filename1" {"9298cvoa" {index-w-first-few-ids-as-str-=-9298cvoa} "filename2" {"ao3oijf8" {index-w-first-few-ids-as-str-=-ao3oijf8}}}
(index-id {:keys [id-fn filename id-name id-type] :as params})
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.
Queries a single or multiple JSON docs from the database by a single or
multiple IDs matching those from the .ndjson
database by id-fn
.
Queries a single or multiple JSON docs from the database by a single or multiple IDs matching those from the `.ndjson` database by `id-fn`. - returns EDN for the matching JSON document.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close