LD4P / sinopia_indexing_pipeline

A containerized, Node-based pipeline for listening to messages, retrieving resources, and indexing them in a search engine.
Apache License 2.0
0 stars 2 forks source link

Index last modified date for a RDF Resource #75

Closed jermnelson closed 5 years ago

jermnelson commented 5 years ago

We need to index the last modified date for a RDF resource. For Trellis resources, this information is part of the audit triples that can be retrieved when setting the HTTP Prefer header to "return=representation; include=\"http://www.trellisldp.org/ns/trellis#PreferAudit\""}

As part of the RDF that is returned are blank-nodes like

<https://trellis.stage.sinopia.io/repository/yale/9f349094-d92f-49de-bb4a-86a65122f9c1>
        prov:wasGeneratedBy  _:b13 .

_:b13   prov:atTime             "2019-08-30T16:38:01.496Z"^^xsd:dateTime ;
        prov:wasAssociatedWith  <https://cognito-idp.us-west-2.amazonaws.com/us-west-2_ilMQW0M0R/7738b6a8-3810-4f0e-b3af-e6be7d6435c4> ;
        rdf:type                as:Update ;
        rdf:type                prov:Activity .

If the rdf:type is as:Update, the prov:atTime's object value should be indexed.

If there is not any as:Update blank-nodes, we should use the as:Create's prov:atTime value Blocks https://github.com/LD4P/sinopia_editor/issues/1412

justinlittman commented 5 years ago

This also blocks #1519. Note that for this ticket, the date will need to be stored in a format that ES can use for sorting.