You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Carmine Paternoster <ca...@gmail.com> on 2013/07/31 17:49:26 UTC
solr 4.4 multiple datasource connection
in my db-data-config.xml i have configured two datasource, each with his
parameter name, for example:
<dataSource name="test1"
type="JdbcDataSource"
driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/firstdb"
user="username1"
password="psw1"/>
<dataSource name="test2"
type="JdbcDataSource"
driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/seconddb"
user="username2"
password="psw2"/>
<document name="content">
<entity name="news" datasource="test1" query="select...">
<field column="OTYPE_ID" name="otypeID" />
<field column="NWS_ID" name="cntID" />
....
</entity>
<entity name="news_update" datasource="test2" query="select...">
<field column="OTYPE_ID" name="otypeID" />
<field column="NWS_ID" name="cntID" />
....
</entity>
</document>
</dataConfig>
but when in solr from dataimport i execute the second entity-name-query it
launch an exception:
"*Table 'firstdb.secondTable' doesn't exist\n\tat*" could someone help me?
thank you in advance
http://stackoverflow.com/questions/17974029/solr-4-4-multiple-datasource-connection
Re: solr 4.4 multiple datasource connection
Posted by Carmine Paternoster <ca...@gmail.com>.
Thank you very much Alex, after modify datasource in dataSource it works...
2013/7/31 Alexandre Rafalovitch <ar...@gmail.com>
> On Wed, Jul 31, 2013 at 11:49 AM, Carmine Paternoster
> <ca...@gmail.com>wrote:
>
> > <entity name="news" datasource="test1" query="select...">
>
>
> Try datasource => dataSource in:
> <entity name="news" datasource="test1" query="select...">
> <entity name="news_update" datasource="test2" query="select...">
>
> Regards,
> Alex.
> P.s. This check will be (eventually) part of SolrLint:
> https://github.com/arafalov/SolrLint/issues/7
>
> Personal website: http://www.outerthoughts.com/
> LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
> - Time is the quality of nature that keeps events from happening all at
> once. Lately, it doesn't seem to be working. (Anonymous - via GTD book)
>
Re: solr 4.4 multiple datasource connection
Posted by Alexandre Rafalovitch <ar...@gmail.com>.
On Wed, Jul 31, 2013 at 11:49 AM, Carmine Paternoster
<ca...@gmail.com>wrote:
> <entity name="news" datasource="test1" query="select...">
Try datasource => dataSource in:
<entity name="news" datasource="test1" query="select...">
<entity name="news_update" datasource="test2" query="select...">
Regards,
Alex.
P.s. This check will be (eventually) part of SolrLint:
https://github.com/arafalov/SolrLint/issues/7
Personal website: http://www.outerthoughts.com/
LinkedIn: http://www.linkedin.com/in/alexandrerafalovitch
- Time is the quality of nature that keeps events from happening all at
once. Lately, it doesn't seem to be working. (Anonymous - via GTD book)