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 Ramesh <ra...@vensaiinc.com> on 2013/11/06 14:25:17 UTC
Data Import Handler
Hi Folks,
Can anyone suggest me how can customize dataconfig.xml file
I want to provide database details like( db_url,uname,password ) from my own
properties file instead of dataconfig.xaml file
RE: Data Import Handler
Posted by Ramesh <ra...@vensaiinc.com>.
Need to be put out of solr like
customized Mysolr_core.properties
how to access it
-----Original Message-----
From: Dyer, James [mailto:James.Dyer@ingramcontent.com]
Sent: Wednesday, November 13, 2013 8:50 PM
To: solr-user@lucene.apache.org
Subject: RE: Data Import Handler
In solrcore.properties, put:
datasource.url=jdbc:xxx:yyy
datasource.driver=com.some.driver
In solrconfig.xml, put:
<requestHandler name="/dih"
class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
...
<str name="dsDriver">${datasource.driver}</str>
<str name="dsUrl">${datasource.url}</str>
...
</lst>
</requestHandler>
In data-config.xml, put:
<dataSource name="ds" driver="${dataimporter.request.dsDriver}"
url="${dataimporter.request.dsUrl}" />
Hope this works for you.
James Dyer
Ingram Content Group
(615) 213-4311
-----Original Message-----
From: Ramesh [mailto:ramesh.potte@vensaiinc.com]
Sent: Wednesday, November 13, 2013 9:00 AM
To: solr-user@lucene.apache.org
Subject: RE: Data Import Handler
James can elaborate how to process driver="${dataimporter.request.driver}"
url ="${dataimporter.request.url}" and all where to mention these my purpose
is to config my DB Details(url,uname,password) in properties file
-----Original Message-----
From: Dyer, James [mailto:James.Dyer@ingramcontent.com]
Sent: Wednesday, November 06, 2013 7:42 PM
To: solr-user@lucene.apache.org
Subject: RE: Data Import Handler
If you prepend the variable name with "dataimporter.request", you can
include variables like these as request parameters:
<dataSource name="ds" driver="${dataimporter.request.driver}"
url="${dataimporter.request.url}" />
/dih?driver=some.driver.class&url=jdbc:url:something
If you want to include these in solrcore.properties, you can additionally
add each property to solrconfig.xml like this:
<requestHandler name="/dih"
class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="driver">${dih.driver}</str>
<str name="url">${dih.url}</str>
</lst>
</requestHandler>
Then in solrcore.properties:
dih.driver=some.driver.class
dih.url=jdbc:url:something
See http://wiki.apache.org/solr/SolrConfigXml?#System_property_substitution
James Dyer
Ingram Content Group
(615) 213-4311
-----Original Message-----
From: Ramesh [mailto:ramesh.potte@vensaiinc.com]
Sent: Wednesday, November 06, 2013 7:25 AM
To: solr-user@lucene.apache.org
Subject: Data Import Handler
Hi Folks,
Can anyone suggest me how can customize dataconfig.xml file
I want to provide database details like( db_url,uname,password ) from my own
properties file instead of dataconfig.xaml file
RE: Data Import Handler
Posted by "Dyer, James" <Ja...@ingramcontent.com>.
In solrcore.properties, put:
datasource.url=jdbc:xxx:yyy
datasource.driver=com.some.driver
In solrconfig.xml, put:
<requestHandler name="/dih" class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
...
<str name="dsDriver">${datasource.driver}</str>
<str name="dsUrl">${datasource.url}</str>
...
</lst>
</requestHandler>
In data-config.xml, put:
<dataSource name="ds" driver="${dataimporter.request.dsDriver}" url="${dataimporter.request.dsUrl}" />
Hope this works for you.
James Dyer
Ingram Content Group
(615) 213-4311
-----Original Message-----
From: Ramesh [mailto:ramesh.potte@vensaiinc.com]
Sent: Wednesday, November 13, 2013 9:00 AM
To: solr-user@lucene.apache.org
Subject: RE: Data Import Handler
James can elaborate how to process driver="${dataimporter.request.driver}"
url ="${dataimporter.request.url}" and all where to mention these
my purpose is to config my DB Details(url,uname,password) in properties file
-----Original Message-----
From: Dyer, James [mailto:James.Dyer@ingramcontent.com]
Sent: Wednesday, November 06, 2013 7:42 PM
To: solr-user@lucene.apache.org
Subject: RE: Data Import Handler
If you prepend the variable name with "dataimporter.request", you can
include variables like these as request parameters:
<dataSource name="ds" driver="${dataimporter.request.driver}"
url="${dataimporter.request.url}" />
/dih?driver=some.driver.class&url=jdbc:url:something
If you want to include these in solrcore.properties, you can additionally
add each property to solrconfig.xml like this:
<requestHandler name="/dih"
class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="driver">${dih.driver}</str>
<str name="url">${dih.url}</str>
</lst>
</requestHandler>
Then in solrcore.properties:
dih.driver=some.driver.class
dih.url=jdbc:url:something
See http://wiki.apache.org/solr/SolrConfigXml?#System_property_substitution
James Dyer
Ingram Content Group
(615) 213-4311
-----Original Message-----
From: Ramesh [mailto:ramesh.potte@vensaiinc.com]
Sent: Wednesday, November 06, 2013 7:25 AM
To: solr-user@lucene.apache.org
Subject: Data Import Handler
Hi Folks,
Can anyone suggest me how can customize dataconfig.xml file
I want to provide database details like( db_url,uname,password ) from my own
properties file instead of dataconfig.xaml file
RE: Data Import Handler
Posted by Ramesh <ra...@vensaiinc.com>.
James can elaborate how to process driver="${dataimporter.request.driver}"
url ="${dataimporter.request.url}" and all where to mention these
my purpose is to config my DB Details(url,uname,password) in properties file
-----Original Message-----
From: Dyer, James [mailto:James.Dyer@ingramcontent.com]
Sent: Wednesday, November 06, 2013 7:42 PM
To: solr-user@lucene.apache.org
Subject: RE: Data Import Handler
If you prepend the variable name with "dataimporter.request", you can
include variables like these as request parameters:
<dataSource name="ds" driver="${dataimporter.request.driver}"
url="${dataimporter.request.url}" />
/dih?driver=some.driver.class&url=jdbc:url:something
If you want to include these in solrcore.properties, you can additionally
add each property to solrconfig.xml like this:
<requestHandler name="/dih"
class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="driver">${dih.driver}</str>
<str name="url">${dih.url}</str>
</lst>
</requestHandler>
Then in solrcore.properties:
dih.driver=some.driver.class
dih.url=jdbc:url:something
See http://wiki.apache.org/solr/SolrConfigXml?#System_property_substitution
James Dyer
Ingram Content Group
(615) 213-4311
-----Original Message-----
From: Ramesh [mailto:ramesh.potte@vensaiinc.com]
Sent: Wednesday, November 06, 2013 7:25 AM
To: solr-user@lucene.apache.org
Subject: Data Import Handler
Hi Folks,
Can anyone suggest me how can customize dataconfig.xml file
I want to provide database details like( db_url,uname,password ) from my own
properties file instead of dataconfig.xaml file
RE: Data Import Handler
Posted by "Dyer, James" <Ja...@ingramcontent.com>.
If you prepend the variable name with "dataimporter.request", you can include variables like these as request parameters:
<dataSource name="ds" driver="${dataimporter.request.driver}" url="${dataimporter.request.url}" />
/dih?driver=some.driver.class&url=jdbc:url:something
If you want to include these in solrcore.properties, you can additionally add each property to solrconfig.xml like this:
<requestHandler name="/dih" class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="driver">${dih.driver}</str>
<str name="url">${dih.url}</str>
</lst>
</requestHandler>
Then in solrcore.properties:
dih.driver=some.driver.class
dih.url=jdbc:url:something
See http://wiki.apache.org/solr/SolrConfigXml?#System_property_substitution
James Dyer
Ingram Content Group
(615) 213-4311
-----Original Message-----
From: Ramesh [mailto:ramesh.potte@vensaiinc.com]
Sent: Wednesday, November 06, 2013 7:25 AM
To: solr-user@lucene.apache.org
Subject: Data Import Handler
Hi Folks,
Can anyone suggest me how can customize dataconfig.xml file
I want to provide database details like( db_url,uname,password ) from my own
properties file instead of dataconfig.xaml file