aggregator.query.db
This module is an API which wraps elastic as a database to be used in EDEN.
all-links
(all-links)
Returns all links currently saved in the elasticsearch database.
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-link
(exact-link aggregate-id entity-id version)
(exact-link from-aggregate from-entity from-version to-aggregate to-entity to-version)
Return the exact link and only that if possible.
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-link
(insert-link link)
Requires a map conforming to the ::aggregator.specs/link as input. Inserts the statement into the database.
insert-statement
(insert-statement statement)
Requires a map conforming to the ::aggregator.specs/statement as input. Inserts the statement into the database.
links-by-target
(links-by-target target-aggregator target-entity target-version)
Return all links with the corresponding target.
links-by-uri
(links-by-uri uri)
Return all link-versions defined by the uri
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.