[
https://issues.apache.org/jira/browse/SOLR-9021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15250378#comment-15250378
]
Kevin Risden commented on SOLR-9021:
------------------------------------
The solrCP variable must be set to the SolrJ jars for the JDBC connection
object. An example R script is below:
{code}
# https://www.rforge.net/RJDBC/
install.packages("RJDBC", dep=TRUE)
library("RJDBC")
solrCP <- c(list.files('/opt/solr/dist/solrj-lib', full.names=TRUE),
list.files('/opt/solr/dist', pattern='solrj', full.names=TRUE, recursive =
TRUE))
drv <- JDBC("org.apache.solr.client.solrj.io.sql.DriverImpl",
solrCP,
identifier.quote="`")
conn <- dbConnect(drv, "jdbc:solr://solr:9983?collection=test", "user", "pwd")
dbGetQuery(conn, "select fielda, fieldb, fieldc, fieldd_s, fielde_i from test
limit 10")
#dbListTables(conn)
#data(iris)
#dbWriteTable(conn, "iris", iris, overwrite=TRUE)
#dbGetQuery(conn, "select count(*) from iris")
#d <- dbReadTable(conn, "iris")
dbDisconnect(conn)
{code}
> SolrJ JDBC - R RJDBC documentation
> ----------------------------------
>
> Key: SOLR-9021
> URL: https://issues.apache.org/jira/browse/SOLR-9021
> Project: Solr
> Issue Type: Sub-task
> Components: SolrJ
> Reporter: Kevin Risden
>
> SOLR-9019 is to check that the Solr JDBC driver is usable from R RJDBC. Once
> it works, it would be great to have this documented like SOLR-8521
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]