Consume schema service events
Summary
Update the Indexer Service to listen to Schema service notifications (create/update).
Details
The Indexer service currently does not listen to Schema change events that can be published by Schema Service. As part of a roadmap to automatically re-index records for extensibility (e.g. virtual properties added to schemas to indicate authoritative surface location) and discoverability, the Indexer needs to receive and process those events.
Note: the Schema Service publication of proper events is not covered by this issue.
For Reference the ADR highlighting the proposed extensibility mechanism for Schemas is here: search-service#69 (closed)
Typical Use Case
User has ingested 100k records of a new wellbore type client:new:wellbore:1.0.0 and they have been indexed successfully.
- A consuming application of those 100k records realizes that the new wellbore schema uses a different property for the default surface location which makes cross-kind searching difficult.
- The owners of the consuming application add a virtual property to the new wellbore schema to specify the default location in line with other kinds.
{ "x-osdu-Virtual-properties":{ "data.VirtualProperties.DefaultLocation": { "type": "object", "priority": [ { "path": "data.ProjectedBottomHoleLocation" }, { "path": "data.GeographicBottomHoleLocation" }, { "path": "data.SpatialLocation" } ]} } }
- Once the schema extension has been added to the new wellbore schema, an event will be fired by Schema Service.
- The Schema Service event indicating update of the new wellbore schema needs to be picked up by the Indexer so that the new DefaultLocation will be indexed by that property name and cross-kind discovery is enabled.