SPARQL best approach for generating flat data for search

356 views Asked by At

We have a triple store of information such as drugs and I'm unsure how I can extract this information to make it available so that it can be indexed by our search engine Elasticsearch. I had envisaged that I would run a SPARQL query to extract the following information:

  • Title
  • Body
  • Href

Please not the triple store does not contain the above structure it's a lot more complicated than that.

One of the requirements is to be able to format the Titles using different triples from the triple store so for example for drugs something like this would be needed:

Paracetamol | Introduction | Drug

(Pracetamol refers to the drug name, Introduction is a subsection and Drug refers to the type)

For the body I was thinking of extracting all the text values from all the triples related to drugs.

And for the href simply using the uri of the resource(drug).

I would then convert this information to JSON-LD so that it can be indexed by Elasticsearch. In the end the JSON-LD will simply contain the title, body and href.

So my question is, is using SPARQL the right approach for what I'm wanting to do or should I look at a different approach to extract the data I need based on the requirements above.

0

There are 0 answers