(add-entry index stem key weight)
Insert an entry into the index, associating {key weight} with stem
Insert an entry into the index, associating {key weight} with stem
(index-text index key data)
(index-text index key txt weight)
Indexes a chunk of text.
key
is an id for your reference.data
can be:
weight
is a multiplier for occurrences.For example:
(index doc-id doc-body) ;; defaults to weight=1
(index doc-id doc-body 3)
(index doc-id [[doc-body 1] [doc-title 2] [doc-tags 2]])
Indexes a chunk of text. - `key` is an id for your reference. - `data` can be: - single string - a seq of [txt weight] pairs. - `weight` is a multiplier for occurrences. For example: (index doc-id doc-body) ;; defaults to weight=1 (index doc-id doc-body 3) (index doc-id [[doc-body 1] [doc-title 2] [doc-tags 2]])
(load-index index filename-or-file)
Load a serialised index from a file, storing the filename in meta.
Load a serialised index from a file, storing the filename in meta.
(make-index)
(make-index stemmer-func)
Create a new (empty) index. Takes an optional stemmer function
Create a new (empty) index. Takes an optional stemmer function
(remove-entries index key stems)
dissociate key from stems
dissociate key from stems
(save-index index)
(save-index index filename-or-file)
Serialise an index to a file. The index stores the filename with the index, and will save to that on subsequent saves.
Serialise an index to a file. The index stores the filename with the index, and will save to that on subsequent saves.
(unindex-all index key)
remove all entries for key. Traverses the entire index.
remove *all* entries for key. Traverses the entire index.
(unindex-text index key txt)
remove all entries for [key txt].
remove all entries for [key txt].
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close