Liking cljdoc? Tell your friends :D

caponia.index


add-entryclj

(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
sourceraw docstring

index-textclj

(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:
    • 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]])
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]])
sourceraw docstring

load-indexclj

(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.
sourceraw docstring

make-indexclj

(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
sourceraw docstring

remove-entriesclj

(remove-entries index key stems)

dissociate key from stems

dissociate key from stems
sourceraw docstring

save-indexclj

(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.
sourceraw docstring

unindex-allclj

(unindex-all index key)

remove all entries for key. Traverses the entire index.

remove *all* entries for key. Traverses the entire index.
sourceraw docstring

unindex-textclj

(unindex-text index key txt)

remove all entries for [key txt].

remove all entries for [key txt].
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close