ilusm.dev

srch

Search engine clients (Elasticsearch, Meilisearch, etc).

Load with: use srch

Quick example

use srch

result = esne("./example")
prn(result)

Functions

Elasticsearch

esne(url)

Creates a new instance. Takes url.

esix(e, nm)

Performs the operation. Takes e, nm.

eshd(e, k, v)

Performs the operation. Takes e, k, v.

esci(e, nm, cf)

Performs the operation. Takes e, nm, cf.

esdel(e, nm)

Performs the operation. Takes e, nm.

esin(e, ix, id, doc)

Initialises. Takes e, ix, id, doc.

esup(e, ix, id, doc)

Updates. Takes e, ix, id, doc.

esgt(e, ix, id)

Performs the operation. Takes e, ix, id.

esrm(e, ix, id)

Removes an item. Takes e, ix, id.

esss(e, ix, qy)

Performs the operation. Takes e, ix, qy.

esma(e, ix, qy)

Performs the operation. Takes e, ix, qy.

esmt(e, ix, txt)

Performs the operation. Takes e, ix, txt.

esbl(e, ix, ops)

Performs the operation. Takes e, ix, ops.

esmp(e, ix, mp)

Performs the operation. Takes e, ix, mp.

Meilisearch

msne(url, ky)

Creates a new instance. Takes url, ky.

msix(c, nm, pk)

Performs the operation. Takes c, nm, pk.

msin(c, ix, docs)

Initialises. Takes c, ix, docs.

msss(c, ix, qy, og)

Performs the operation. Takes c, ix, qy, og.

msst(c, ix, st)

Sets a value or starts a process. Takes c, ix, st.

Simple in-memory search

srne()

Creates a new instance.

srad(s, id, doc, flds)

Adds an item. Takes s, id, doc, flds.

srss(s, qy)

Performs the operation. Takes s, qy.

srfz(s, qy, fld)

Performs the operation. Takes s, qy, fld.

Notes

  • Search utilities - binary search, fuzzy search, ranked results.