aggregator.query.db

This module is an API which wraps elastic as a database to be used in EDEN.

all-statements

(all-statements)

Returns all statements currently saved in the elasticsearch database.

entities-by-uri

(entities-by-uri uri entity-type)

Returns all entities matched by the uri.

exact-statement

(exact-statement aggregate-id entity-id version)

Return the exact statement and only that if possible.

get-undercuts

(get-undercuts target-aggregator target-entity-id)

Returns all undercuts that point to target aggregator and entity-id.

insert-statement

(insert-statement statement)

Requires a map conforming to the ::aggregator.specs/statement as input. Inserts the statement into the database.

part-uri

(part-uri uri)

A helper function which splits an URI at /. Returns a tuple with the first and second part.

random-statements

(random-statements num)

Return num random statements from the db.

statements-by-author

(statements-by-author author)

Return all statements with a certain author.

statements-by-uri

(statements-by-uri uri)

Return all versions of the desired statement or :missing if it can not be found.

statements-contain

(statements-contain query)

Return all statements from the elasticsearch-db where content.content-string containts query

unpack-elastic

(unpack-elastic response)

Unpack an elasticsearch response to a list of entities.