# \[ANN\] Elasticsearch RDF Jena Plugin

**URL:** <https://discuss.elastic.co/t/ann-elasticsearch-rdf-jena-plugin/21415>\
**Category:** Elasticsearch\
**Created:** [December 28, 2014, 8:01pm UTC](https://discuss.elastic.co/t/ann-elasticsearch-rdf-jena-plugin/21415 "2014-12-28T20:01:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [December 28, 2014, 8:01pm UTC](https://discuss.elastic.co/t/ann-elasticsearch-rdf-jena-plugin/21415/1 "2014-12-28T20:01:22Z")

</div>

Hi,

do you want to turn your Elasticsearch into a SPARQL endpoint?

This Elasticsearch plugin stores and retrieves RDF triples by using the  
Apache Jena API:

> **[jprante/elasticsearch-plugin-rdf-jena](https://github.com/jprante/elasticsearch-plugin-rdf-jena)**
>
> elasticsearch-plugin-rdf-jena - Using Apache Jena API to store and retrieve RDF triples in Elasticsearch

Apache Jena [http://jena.apache.org](http://jena.apache.org) is a free and open source Java framework  
for building semantic web and Linked Data applications. The framework is  
composed of different APIs interacting together to process RDF data.

Each triple will be stored as a single document, and Jena API uses term  
filter queries to match triples. Due to the restrictions of such an  
architecture, do not expect good SPARQL performance.

The implementation is based heavily on the work of Andrea Gazzarini's  
SolRDF [https://github.com/agazzarini/SolRDF](https://github.com/agazzarini/SolRDF)

Feedback, contributions etc. are most welcome!

Best,

Jörg

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHuAEvGTFU3R85LPMV\_z7ZoKtLHp1G18ka5U2LuY51nOw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHuAEvGTFU3R85LPMV_z7ZoKtLHp1G18ka5U2LuY51nOw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jackpark](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jackpark](https://discuss.elastic.co/u/jackpark)\
**Post date:** [December 28, 2014, 8:19pm UTC](https://discuss.elastic.co/t/ann-elasticsearch-rdf-jena-plugin/21415/2 "2014-12-28T20:19:35Z")

</div>

Great idea!

Need a clarification.

All of the java source files I opened say Apache license, but the readme  
says AGPL.

Which license is it?

On Sun, Dec 28, 2014 at 12:01 PM, [joergprante@gmail.com](mailto:joergprante@gmail.com) \<  
[joergprante@gmail.com](mailto:joergprante@gmail.com)\> wrote:

> Hi,
> 
> do you want to turn your Elasticsearch into a SPARQL endpoint?
> 
> This Elasticsearch plugin stores and retrieves RDF triples by using the  
> Apache Jena API:
> 
> [https://github.com/jprante/elasticsearch-plugin-rdf-jena](https://github.com/jprante/elasticsearch-plugin-rdf-jena)
> 
> Apache Jena [http://jena.apache.org](http://jena.apache.org) is a free and open source Java  
> framework for building semantic web and Linked Data applications. The  
> framework is composed of different APIs interacting together to process RDF  
> data.
> 
> Each triple will be stored as a single document, and Jena API uses term  
> filter queries to match triples. Due to the restrictions of such an  
> architecture, do not expect good SPARQL performance.
> 
> The implementation is based heavily on the work of Andrea Gazzarini's  
> SolRDF [GitHub - spaziocodice/SolRDF: An RDF plugin for Solr](https://github.com/agazzarini/SolRDF)
> 
> Feedback, contributions etc. are most welcome!
> 
> Best,
> 
> Jörg
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHuAEvGTFU3R85LPMV\_z7ZoKtLHp1G18ka5U2LuY51nOw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHuAEvGTFU3R85LPMV_z7ZoKtLHp1G18ka5U2LuY51nOw%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHuAEvGTFU3R85LPMV\_z7ZoKtLHp1G18ka5U2LuY51nOw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHuAEvGTFU3R85LPMV_z7ZoKtLHp1G18ka5U2LuY51nOw%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAH6s0fzjjXBe0r5E%2BYwe1hbXidbmsYv7dZ4kFDE18xw%2B3%3D%2BvRw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAH6s0fzjjXBe0r5E%2BYwe1hbXidbmsYv7dZ4kFDE18xw%2B3%3D%2BvRw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![seralf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seralf/32/44805_2.png) [@seralf](https://discuss.elastic.co/u/seralf)\
**Post date:** [December 28, 2014, 8:42pm UTC](https://discuss.elastic.co/t/ann-elasticsearch-rdf-jena-plugin/21415/3 "2014-12-28T20:42:26Z")

</div>

HI great news!! 🙂  
nice work, as well as the plugin from Gazzarini on Solr! 🙂

I can't wait to seriously play a little with both... 🙂

Have you already done some tests on the triples? I mean: is it possible to  
use the ES replication to provide triples to other nodes, query on multiple  
nodes via SPARQL etc?

PS: have you some plan about what we discussed here:  
[https://groups.google.com/forum/#!searchin/elasticsearch/json-ld/elasticsearch/hPu1e7TrL40/XHKd2WIeZrYJ](https://groups.google.com/forum/#!searchin/elasticsearch/json-ld/elasticsearch/hPu1e7TrL40/XHKd2WIeZrYJ)  
I'd like to find a way to separate mappings from data easily...

if I could give some help, please let me know!

Il giorno domenica 28 dicembre 2014 21:01:28 UTC+1, Jörg Prante ha scritto:

> Hi,
> 
> do you want to turn your Elasticsearch into a SPARQL endpoint?
> 
> This Elasticsearch plugin stores and retrieves RDF triples by using the  
> Apache Jena API:
> 
> [https://github.com/jprante/elasticsearch-plugin-rdf-jena](https://github.com/jprante/elasticsearch-plugin-rdf-jena)
> 
> Apache Jena [http://jena.apache.org](http://jena.apache.org) is a free and open source Java  
> framework for building semantic web and Linked Data applications. The  
> framework is composed of different APIs interacting together to process RDF  
> data.
> 
> Each triple will be stored as a single document, and Jena API uses term  
> filter queries to match triples. Due to the restrictions of such an  
> architecture, do not expect good SPARQL performance.
> 
> The implementation is based heavily on the work of Andrea Gazzarini's  
> SolRDF [GitHub - spaziocodice/SolRDF: An RDF plugin for Solr](https://github.com/agazzarini/SolRDF)
> 
> Feedback, contributions etc. are most welcome!
> 
> Best,
> 
> Jörg

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5f2647d8-c96f-4a0e-b98a-5ee728862d34%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5f2647d8-c96f-4a0e-b98a-5ee728862d34%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [December 28, 2014, 9:32pm UTC](https://discuss.elastic.co/t/ann-elasticsearch-rdf-jena-plugin/21415/4 "2014-12-28T21:32:25Z")

</div>

Apache - sorry for the README mistake, will be fixed.

Jörg

On Sun, Dec 28, 2014 at 9:19 PM, Jack Park [jackpark@topicquests.org](mailto:jackpark@topicquests.org) wrote:

> Great idea!
> 
> Need a clarification.
> 
> All of the java source files I opened say Apache license, but the readme  
> says AGPL.
> 
> Which license is it?
> 
> On Sun, Dec 28, 2014 at 12:01 PM, [joergprante@gmail.com](mailto:joergprante@gmail.com) \<  
> [joergprante@gmail.com](mailto:joergprante@gmail.com)\> wrote:
> 
> > Hi,
> > 
> > do you want to turn your Elasticsearch into a SPARQL endpoint?
> > 
> > This Elasticsearch plugin stores and retrieves RDF triples by using the  
> > Apache Jena API:
> > 
> > [https://github.com/jprante/elasticsearch-plugin-rdf-jena](https://github.com/jprante/elasticsearch-plugin-rdf-jena)
> > 
> > Apache Jena [http://jena.apache.org](http://jena.apache.org) is a free and open source Java  
> > framework for building semantic web and Linked Data applications. The  
> > framework is composed of different APIs interacting together to process RDF  
> > data.
> > 
> > Each triple will be stored as a single document, and Jena API uses term  
> > filter queries to match triples. Due to the restrictions of such an  
> > architecture, do not expect good SPARQL performance.
> > 
> > The implementation is based heavily on the work of Andrea Gazzarini's  
> > SolRDF [GitHub - spaziocodice/SolRDF: An RDF plugin for Solr](https://github.com/agazzarini/SolRDF)
> > 
> > Feedback, contributions etc. are most welcome!
> > 
> > Best,
> > 
> > Jörg
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHuAEvGTFU3R85LPMV\_z7ZoKtLHp1G18ka5U2LuY51nOw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHuAEvGTFU3R85LPMV_z7ZoKtLHp1G18ka5U2LuY51nOw%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHuAEvGTFU3R85LPMV\_z7ZoKtLHp1G18ka5U2LuY51nOw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHuAEvGTFU3R85LPMV_z7ZoKtLHp1G18ka5U2LuY51nOw%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAH6s0fzjjXBe0r5E%2BYwe1hbXidbmsYv7dZ4kFDE18xw%2B3%3D%2BvRw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAH6s0fzjjXBe0r5E%2BYwe1hbXidbmsYv7dZ4kFDE18xw%2B3%3D%2BvRw%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAH6s0fzjjXBe0r5E%2BYwe1hbXidbmsYv7dZ4kFDE18xw%2B3%3D%2BvRw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAH6s0fzjjXBe0r5E%2BYwe1hbXidbmsYv7dZ4kFDE18xw%2B3%3D%2BvRw%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGD1SGoVsdBttYyQS7UjYN%3DXtCJXpVbvftBibNtBYwXHw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGD1SGoVsdBttYyQS7UjYN%3DXtCJXpVbvftBibNtBYwXHw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [December 28, 2014, 9:50pm UTC](https://discuss.elastic.co/t/ann-elasticsearch-rdf-jena-plugin/21415/5 "2014-12-28T21:50:50Z")

</div>

With this RDF Jena plugin, you can set up indices like any other index,  
only the mapping is kind of strict:

[https://github.com/jprante/elasticsearch-plugin-rdf-jena/blob/master/src/main/resources/org/xbib/elasticsearch/module/rdf/jena/mapping.json](https://github.com/jprante/elasticsearch-plugin-rdf-jena/blob/master/src/main/resources/org/xbib/elasticsearch/module/rdf/jena/mapping.json)

That means, with replica settings, triples (like docs) are replicated to  
other nodes and yes, they can be queried by SPARQL. I haven't tested it  
much but it is easy now to build loaders who can lift some billions of  
triples into ES and run SPARQL over it.

Being frankly, I am not a big fan of SPARQL implementations because SPARQL  
is so cumbersome, slow, and difficult to use in RDF processing. I still  
have to understand how Jena will exercise ES though. With the plugin, there  
are several restrictions, like translating ORDER BY to ES sort clauses,  
which is an open challenge.

With JSON-LD and ES being a document store, I am still after an alternative  
method how to translate SPARQL queries to performant ES queries on ordinary  
JSON docs, operating on documents which look more like a DESCRIBE result,  
and contexts saved similar to templates in an internal index. This is my  
favorite idea I have not dropped. I can now compare this better to a pure  
Jena API plugin approach.

Jörg

On Sun, Dec 28, 2014 at 9:42 PM, Alfredo Serafini [seralf@gmail.com](mailto:seralf@gmail.com) wrote:

> HI great news!! 🙂  
> nice work, as well as the plugin from Gazzarini on Solr! 🙂
> 
> I can't wait to seriously play a little with both... 🙂
> 
> Have you already done some tests on the triples? I mean: is it possible to  
> use the ES replication to provide triples to other nodes, query on multiple  
> nodes via SPARQL etc?
> 
> PS: have you some plan about what we discussed here:
> 
> [Redirecting to Google Groups](https://groups.google.com/forum/#!searchin/elasticsearch/json-ld/elasticsearch/hPu1e7TrL40/XHKd2WIeZrYJ)  
> I'd like to find a way to separate mappings from data easily...
> 
> if I could give some help, please let me know!
> 
> Il giorno domenica 28 dicembre 2014 21:01:28 UTC+1, Jörg Prante ha scritto:
> 
> > Hi,
> > 
> > do you want to turn your Elasticsearch into a SPARQL endpoint?
> > 
> > This Elasticsearch plugin stores and retrieves RDF triples by using the  
> > Apache Jena API:
> > 
> > [https://github.com/jprante/elasticsearch-plugin-rdf-jena](https://github.com/jprante/elasticsearch-plugin-rdf-jena)
> > 
> > Apache Jena [http://jena.apache.org](http://jena.apache.org) is a free and open source Java  
> > framework for building semantic web and Linked Data applications. The  
> > framework is composed of different APIs interacting together to process RDF  
> > data.
> > 
> > Each triple will be stored as a single document, and Jena API uses term  
> > filter queries to match triples. Due to the restrictions of such an  
> > architecture, do not expect good SPARQL performance.
> > 
> > The implementation is based heavily on the work of Andrea Gazzarini's  
> > SolRDF [GitHub - spaziocodice/SolRDF: An RDF plugin for Solr](https://github.com/agazzarini/SolRDF)
> > 
> > Feedback, contributions etc. are most welcome!
> > 
> > Best,
> > 
> > Jörg
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/5f2647d8-c96f-4a0e-b98a-5ee728862d34%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5f2647d8-c96f-4a0e-b98a-5ee728862d34%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/5f2647d8-c96f-4a0e-b98a-5ee728862d34%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/5f2647d8-c96f-4a0e-b98a-5ee728862d34%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFcMoSmJmc4yJWZi5FsZqiGKkMD4k%2BFrbjeTYOaqV3hmQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFcMoSmJmc4yJWZi5FsZqiGKkMD4k%2BFrbjeTYOaqV3hmQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:41am UTC](https://discuss.elastic.co/t/ann-elasticsearch-rdf-jena-plugin/21415/6 "2017-07-06T00:41:41Z")

</div>


