Deprecated. This material represents early efforts and may be of interest to historians. It doe not describe current VIVO efforts.
...
Panel | |||||||
---|---|---|---|---|---|---|---|
|
...
Permits external applications to provide to request specific updates to the VIVO search index, by providing a list of URIs , and to request that the corresponding records in the search index be updatedwhose search records may be out of date.
When the VIVO triple-store is updated in any a way that bypasses VIVO's internal data channels, the search index will not reflect the changesupdates. Prior to VIVO release 1.6, the only solution was to rebuild the entire search index, from the Site Administration
page.
With this service, you can provide a list of URIs whose contents have changed, and request that only those search records be updated. This is usually faster than rebuilding the entire index.
Note |
---|
By default, the SPARQL Update API is disabled in VIVO, for security reasons. See |
...
Some sites use two VIVO instances. One is : a staging instance , and all a production instance. All ingests occur there. The other is a production instance, and periodically on the staging instance. Periodically, the triple-store is copied from staging to production. When this is done, you have 3 options:
...
In most cases, the time required to re-inference the model is greater than the time required to rebuild the search index. Unfortunately, the reasoning process is not easy to partition. To date, VIVO has no service that would allow you to update the inferences on a limited set of data.
[vivo]/apisearchService/sparqlUpdateupdateUrisInSearch
...
http://vivo.cornell.edu/apisearchService/sparqlUpdateupdateUrisInSearch |
http://localhost:8080/vivo/api |
|
The API supports only HTTP POST calls. GET, HEAD, and other methods are not supported, and will return a response code of 400 Bad Request
requests with a content type of multipart/form-data
.
If the request does not specify an encoding, UTF-8 is assumed.
name | value |
---|---|
email | the email address of a VIVO adminstrator administrator account |
password | the password of the VIVO administrator account |
update | A SPARQL Update request |
The syntax for a SPARQL Update request is described on the World Wide Web Consortium site at http://www.w3.org/TR/2013/REC-sparql11-update-20130321/
other | One or more content parts, containing URIs to be indexed, separated by white space and/or commas |
The name of the file content is unimportant. The API will examine all parts of the request and add any URIs to the list to be indexed. It is common, however, to put the entire list of URIs into a single content partThe API requires that you specify a GRAPH in your SPARQL update request. Insertions or deletions to the default graph are not supported.
Code | Reason |
---|---|
200 OK | SPARQL Update was successful. |
400 Bad Request | Incorrect HTTP method; only POST is accepted. |
HTTP request did not include an update parameter. | |
The SPARQL Update request did not specify a GRAPH. | |
The SPARQL Update request was syntactically incorrect. | |
Search indexing request was successful. | |
403 Forbidden | HTTP request did not include an email parameter. |
HTTP request did not include a password parameter. | |
The combination of email and password is not valid. | |
The selected VIVO account is not authorized to use the SPARQL Update API. | |
500 Internal Server Error | VIVO could not execute the request; internal code threw an exception. |
These examples use This example uses the UNIX curl
command to insert and delete data using the API.
...
to request updates to the search records of 3 individuals.
Code Block |
---|
curl -v --form 'email=testAdmin@mydomain.edu' --form 'password=Password' --form 'uris=@uriList.txt' 'http://localhost:8080/vivo/searchService/updateUrisInSearch' |
Code Block | ||
---|---|---|
| ||
http://vivo.mydomain.edu/individual/n6724
http://vivo.mydomain.edu/individual/n90987
http://vivo.mydomain.edu/individual/n32 |