We have a cloud base Java application that uses Oracle DB and Apache Solr for document indexing/searching. I need to implement an ontology and I intend to use Apache Jena. It's an uncharted territory for me. According to the docs, seems that using TDB, we can use Oracle DB for storage/query, but it's not clear to me if we can use Apache Solr for the same purpose. Is that possible? What are the pros/cons? Can you give me e brief comparison between TDB and Solr in regard with that?
1 Answers
tl;dr You can do this, but it's obviously not meant to be this way.
The base question here is: Can we store ontological data in something as flat a s Lucene/Solr index. Well, with enough work and dedication you can do this. I wrote a Lucene-based store for Topic Maps data several years ago. It earned me a masters degree in Comp.Sci. But that is not what you want, I suppose.
The Apache Jena extension TDB is a database of its own, designed for easy use in Jena. As far as I'm concerned, there is no such connector for Solr to use as a store. If you insist on using Solr as the datastore you will have to a) think hard about how to flatten the ontological data into index tables and b) implement the connector by yourself.
I'd say, go with TDB and if you want to do text search with Jena, use something like the TEXT QUERY extension.

- 432
- 2
- 10