java -jar PROGRESS_DATADIRECT_JDBC_SQLSERVER_ALL.jar -i console
bin/solr start
bin/solr create -c your_corename
bin/solr stop
cp /path-to/
Progress/DataDirect/Connect_for_JDBC_51/lib/sqlserver.jar
/path-to/ solr-
6.6.0/contrib/dataimporthandler/lib/sqlserver.jar
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-dataimporthandler-.*\.jar" />
<lib dir="${solr.install.dir:../../../..}/contrib/dataimporthandler/lib" regex=".*\.jar" />
<
requestHandler
name
=
"/dataimport"
class
=
"org.apache.solr.handler.dataimport.DataImportHandler"
>
<
lst
name
=
"defaults"
>
<
str
name
=
"config"
>/path-to/solr-6.6.0/server/solr/your_corename/conf/data-config.xml</
str
>
</
lst
>
</
requestHandler
>
<
dataConfig
>
<
dataSource
type
=
"JdbcDataSource"
driver
=
"com.ddtek.jdbc.sqlserver.SQLServerDriver"
url="jdbc:datadirect:sqlserver://<;Server1>;DatabaseName=<
dbname
>"
user="<
user
>"
password="<
pass
>"/>
<
document
>
<
entity
name
=
"Products"
pk
=
"ProductID"
query
=
"select * from Products"
>
<
field
column
=
"ProductID"
name
=
"ProductID"
/>
<
field
column
=
"ProductName"
name
=
"ProductName"
/>
<
field
column
=
"QuantityPerUnit"
name
=
"QuantityPerUnit"
/>
<
field
column
=
"UnitPrice"
name
=
"UnitPrice"
/>
<
field
column
=
"UnitsinStock"
name
=
"UnitsinStock"
/>
<
field
column
=
"UnitsOnOrder"
name
=
"UnitsOnOrder"
/>
<
field
column
=
"ReorderLevel"
name
=
"ReorderLevel"
/>
<
field
column
=
"Discontinued"
name
=
"Discontinued"
/>
</
entity
>
</
document
>
</
dataConfig
>
<
uniqueKey
>ProductID</
uniqueKey
>
<
field
name
=
"ProductID"
type
=
"int"
indexed
=
"true"
stored
=
"true"
required
=
"true"
multiValued
=
"false"
/>
<
field
name
=
"ProductName"
type
=
"string"
indexed
=
"true"
stored
=
"true"
multiValued
=
"false"
/>
<
field
name
=
"SupplierID"
type
=
"int"
indexed
=
"true"
stored
=
"true"
multiValued
=
"false"
/>
<
field
name
=
"CategoryID"
type
=
"int"
indexed
=
"true"
stored
=
"true"
multiValued
=
"false"
/>
<
field
name
=
"QuantityPerUnit"
type
=
"string"
indexed
=
"true"
stored
=
"true"
multiValued
=
"false"
/>
<
field
name
=
"UnitPrice"
type
=
"double"
indexed
=
"true"
stored
=
"true"
multiValued
=
"false"
/>
<
field
name
=
"UnitsInStock"
type
=
"int"
indexed
=
"true"
stored
=
"true"
multiValued
=
"false"
/>
<
field
name
=
"UnitsOnOrder"
type
=
"int"
indexed
=
"true"
stored
=
"true"
multiValued
=
"false"
/>
<
field
name
=
"ReorderLevel"
type
=
"int"
indexed
=
"true"
stored
=
"true"
multiValued
=
"false"
/>
<
field
name
=
"Discontinued"
type
=
"boolean"
indexed
=
"true"
stored
=
"true"
multiValued
=
"false"
/>
bin/solr start