Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[rdf4j-dev] Elasticsearch

Hi,

For work I’m currently combining elasticsearch and RDF4J to handle hierarchical filters. 

A good example is a car model hierarchy. 

Mercedes
 - E class
 - - E320 CDI
 - S class
VW
 - Golf
 - - Golf GTI

I handle this by having a graph with the hierarchy and a field in the elasticsearch document for the IRI. Then I enrich the document in elasticsearch by querying RDF4J for the parent* path and store that list in the document. 

So if a document has model=Golf TDI, then the inferredModelList=[Golf TDI, Golf, VW]. This makes filtering super easy afterwards, since the user can filter on Golf and get Golf TDI models. 

This uses Elasticsearch for what it’s best at and RDF4J for what it’s best at. The SPARQL query to handle both the hierarchy and a owl:sameAs relationship is super simple. 

I was wondering if anyone has thought to use elasticsearch as the main storage in RDF4J. Currently I’m using NativeStore, but it would be awesome if I could just store everything in elasticsearch. Since I’m both dev and ops on this project it would be awesome with one fewer database to backup. 

Håvard

Back to the top