Hi wunder,

for us, it works with internal dots when specifying the properties in
$SOLR_HOME/[core]/conf/solrcore.properties:

like this:
db.url=xxx
db.user=yyy
db.passwd=zzz

$SOLR_HOME/[core]/conf/data-config.xml:

<dataSource type="JdbcDataSource"
driver="oracle.jdbc.driver.OracleDriver" url="${db.url}"
user="${db.user}" password="${db.passwd}" batchSize="1000" />



Cheers,
Chantal

On Sat, 2012-01-21 at 01:01 +0100, Walter Underwood wrote:
> Weird. I can make it work with a request parameter and 
> $dataimporter.request.dbhost:
> 
> http://localhost:8983/solr/textbooks/dataimport?command=full-import&dbhost=mydbhost
> 
> Or I can make it work with a Java system property with no dots.
> 
> But when I use a Java system property with internal dots, it doesn't work.
> 
> wunder
> 
> On Jan 20, 2012, at 3:53 PM, Walter Underwood wrote:
> 
> > On Jan 20, 2012, at 3:34 PM, Shawn Heisey wrote:
> > 
> >> On 1/20/2012 3:48 PM, Walter Underwood wrote:
> >>> Is there a way to parameterize the JDBC URL in the data import handler?  
> >>> I tried this, but it did not insert the value of the property. I'm 
> >>> running Solr 3.3.0.
> >>> 
> >>>  <dataSource driver="com.mysql.jdbc.Driver"
> >>>         url="jdbc:mysql://${com.chegg.dbhost}/product"
> >> 
> >> Here's what I've got in mine.  I pass in dbHost and dbSchema parameters 
> >> (along with a bunch of others that get used in the entity SQL statements) 
> >> when starting DIH.
> >> 
> >> url="jdbc:mysql://${dataimporter.request.dbHost}:3306/${dataimporter.request.dbSchema}?zeroDateTimeBehavior=convertToNull"
> > 
> > 
> > Are those Java system properties? I didn't get a substitution when I ran: 
> > java -Dcom.chegg.dbhost=mydbhost
> > 
> > The resulting JDBC URL was jdbc:mysql:///product, so it replaced the 
> > variable with empty string. Odd.
> > 
> > wunder
> > --
> > Walter Underwood
> > wun...@wunderwood.org
> 
> 
> 
> 

Reply via email to