The Apache SOLR Translator, known by the type name solr, exposes querying functionality to Solr Data Sources. Apache Solr is a search engine built on top of Apache Lucene for indexing and searching. This translator provides an easy way connect to existing or a new Solr search system, and provides way to add documents/records from directly from user or from other sources that are integrated with Teiid. It also gives ability to read/update/delete existing documents from Solr Search system.
The Solr Translator currently has no import or execution properties. It does not define any extension metadata.
The usage Solr translator can be highly dependent on user's usecase(s). Here are some common scenarios.
Solr search system provides searches based on indexed search fields. Each Solr instance is typically configured with a single core that defines multiple fields with different type information. Teiid metadata querying mechanism is equipped with "Luke" based queries, that at deploy time of the VDB use this mechanism to retrieve all the stored/indexed fields. Currently Teiid does NOT support dynamic fields and non-stored fields. Based on retrieved fields, Solr translator exposes a single table that contains all the fields. If a field is multi-value based, it's type is represented as Array type.
Once this table is exposed through VDB in a Teiid database, and Solr Datasources is created, the user can issue "INSERT/UPDATE/DELETE" based SQL calls to insert/update/delete documents into the Solr, and issue "SELECT" based calls to retrieve documents from Solr. You can use full range of SQL with Teiid system integrating other sources along with Solr source.
The Solr Translator supports SELECT statements with a restrictive set of capabilities including: comparison predicates, IN predicates, LIMIT and Order By.
An Example Dynamic VDB that shows Solr translator can be defined as
<vdb name="search" version="1">
<model name="solr">
<source name="node-one" translator-name="solr" connection-jndi-name="java:/solrDS"/>
</model>
<vdb>
The translator does NOT provide a connection to the Solr. For that purpose, Teiid has a JCA adapter that provides a connection to Solr using the SolrJ Java library. To define such connector, see Solr Data Sources or see an example in "<jboss-as>/docs/teiid/datasources/solr"
If you are using Designer Tooling, to create VDB then
The Teiid specific Solr Resource Adapter should be used with this translator. See Solr Data Sources for connecting to a Solr Search Engine.
| This feature is not applicable for Solr translator. |
| This feature is not available for Solr translator currently. |