This repository has been archived by the owner on Feb 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
api: optional recursion of transitive relations #49
Comments
jbenito3
added a commit
to jbenito3/claimstore
that referenced
this issue
Sep 17, 2015
* Adds an extra Model that keeps track of all the equivalent IDs. (closes inveniosoftware#49) * Enables transitive queries to fetch all the related claims (through `/claims?type=xxx&value=yyy&recurse=1`. * Adds a new API resource `/eqids` to list all the equivalent IDs (one can also filter by a specific id using the argument `eqid=`). Signed-off-by: Jose Benito Gonzalez Lopez <jose.benito.gonzalez@cern.ch>
jbenito3
added a commit
to jbenito3/claimstore
that referenced
this issue
Sep 17, 2015
* Adds an extra Model that keeps track of all the equivalent IDs. (closes inveniosoftware#49) * Enables transitive queries to fetch all the related claims (through `/claims?type=xxx&value=yyy&recurse=1`. * Adds a new API resource `/eqids` to list all the equivalent IDs (one can also filter by a specific id using the argument `eqid=`). Signed-off-by: Jose Benito Gonzalez Lopez <jose.benito.gonzalez@cern.ch>
jbenito3
added a commit
to jbenito3/claimstore
that referenced
this issue
Sep 18, 2015
* Adds an extra Model that keeps track of all the equivalent IDs. (closes inveniosoftware#49) * Enables transitive queries to fetch all the related claims (through `/claims?type=xxx&value=yyy&recurse=1`. * Adds a new API resource `/eqids` to list all the equivalent IDs (one can also filter by a specific id using the argument `eqid=`). Signed-off-by: Jose Benito Gonzalez Lopez <jose.benito.gonzalez@cern.ch>
jbenito3
added a commit
to jbenito3/claimstore
that referenced
this issue
Sep 18, 2015
* Adds an extra Model that keeps track of all the equivalent IDs. (closes inveniosoftware#49) * Enables transitive queries to fetch all the related claims (through `/claims?type=xxx&value=yyy&recurse=1`. * Adds a new API resource `/eqids` to list all the equivalent IDs (one can also filter by a specific id using the argument `eqid=`). * Adds command `claimstore index` in order to do operations with indeces. For instance: `claimstore index clear_eqids` and `claimstore index rebuild_eqids`. Signed-off-by: Jose Benito Gonzalez Lopez <jose.benito.gonzalez@cern.ch>
jbenito3
added a commit
to jbenito3/claimstore
that referenced
this issue
Sep 18, 2015
* Adds an extra Model that keeps track of all the equivalent IDs. (closes inveniosoftware#49) * Enables transitive queries to fetch all the related claims (through `/claims?type=xxx&value=yyy&recurse=1`. * Adds a new API resource `/eqids` to list all the equivalent IDs (one can also filter by a specific id using the argument `eqid=`). * Adds command `claimstore index` in order to do operations with indeces. For instance: `claimstore index clear_eqids` and `claimstore index rebuild_eqids`. Signed-off-by: Jose Benito Gonzalez Lopez <jose.benito.gonzalez@cern.ch>
jbenito3
added a commit
to jbenito3/claimstore
that referenced
this issue
Sep 18, 2015
* Adds an extra Model that keeps track of all the equivalent IDs. (closes inveniosoftware#49) * Enables transitive queries to fetch all the related claims (through `/claims?type=xxx&value=yyy&recurse=1`. * Adds a new API resource `/eqids` to list all the equivalent IDs (one can also filter by a specific id using the argument `eqid=`). * Adds command `claimstore index` in order to do operations with indeces. For instance: `claimstore index clear_eqids` and `claimstore index rebuild_eqids`. Signed-off-by: Jose Benito Gonzalez Lopez <jose.benito.gonzalez@cern.ch>
jbenito3
added a commit
to jbenito3/claimstore
that referenced
this issue
Sep 18, 2015
* Adds an extra Model that keeps track of all the equivalent IDs. (closes inveniosoftware#49) * Enables transitive queries to fetch all the related claims (through `/claims?type=xxx&value=yyy&recurse=1`. * Adds a new API resource `/eqids` to list all the equivalent IDs (one can also filter by a specific id using the argument `eqid=`). * Adds command `claimstore index` in order to do operations with indeces. For instance: `claimstore index clear_eqids` and `claimstore index rebuild_eqids`. Signed-off-by: Jose Benito Gonzalez Lopez <jose.benito.gonzalez@cern.ch>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Background
Consider the following set of claims:
The
is_same_as
predicate represents strong equality,is_variant_of
weakerequality. Both relations are transitive, meaning that if x R y and y R z, then x
R z.
Approach 1: iterative queries client-side
Imagine the following query:
that basically asks "who does know anything about bibcode1"?
From the raw claim matching point of view, this query should return only the
claim number 03, which was inputted using bibcode1. After which the client could
then ask "who knows about INSPIRE1 then?", proceeding iteratively on
the client side as need be. This is not ideal as it can lead to many nested
queries.
Approach 2: resolving transitive relations server-side
Considering the fact that the sought-after relation is transitive, the
ClaimStore itself could attempt to resolve these recursions on the server side,
returning directly also the claim 01 that is joined by means of claim 02 to the
claim number 03.
The behaviour of the API could be parametrised via a new
recurse
option:that would be False by default, True on demand.
Optionally, the query can accept a
certainty
argument:which would include into recursing only those relations that have a certainty of
at least 0.9.
(see also #8)
The text was updated successfully, but these errors were encountered: