Hi Rick,

I tried installing SOLR 6.0 since SOLR 6.0 has managed-schema and tried
index the data from mongoDB :


<dataConfig>
<dataSource name="mongod" type="JdbcDataSource"
driver="com.mongodb.jdbc.MongoDriver" url="mongodb://
​<<>IP-Address>​
:27017/
​<<DB-NAME>>
"/>
<document name="products">
<entity name="products"
dataSource="mongod"
transformer="TemplateTransformer,ProdsCatsFieldTransformer"
onError="continue"
pk="uuid"
query="SELECT
orgidStr,idStr,name,code,description,price,images,categoriesStr,enddate_solar,begin_date_solar,status_solar,current_stock_solar,retprice_solar,distprice_solar,listprice_solar,mfgprice_solar,out_of_stock_solar,hide_product_solar,saleprice_solar,metakey_solar,sales_enabled,new_product,has_sku,configurable,rating,updatedAt,comparable,hide_price
FROM products"
deltaImportQuery="SELECT
orgidStr,idStr,name,code,description,price,images,categoriesStr,enddate_solar,begin_date_solar,status_solar,current_stock_solar,retprice_solar,distprice_solar,listprice_solar,mfgprice_solar,out_of_stock_solar,hide_product_solar,saleprice_solar,metakey_solar,sales_enabled,new_product,has_sku,configurable,rating,updatedAt,comparable,hide_price
FROM products WHERE orgidStr = '${dataimporter.request.orgid}' AND idStr =
'${dataimporter.delta.idStr}'"
deltaQuery="SELECT idStr FROM products WHERE idStr =
'${dataimporter.request.prodidStr}' AND orgidStr =
'${dataimporter.request.orgid}'"
>
<field column="orgidStr" name="prod_orgidStr"/>
<field column="idStr" name="prod_idStr"/>
<field column="uuid" name="uuid"
template="org-${products.orgidStr}-prod-${products.idStr}"/>
<field column="name" name="prod_name"/>
<field column="code" name="prod_code"/>
<field column="description" name="description"/>
<field column="price" name="price"/>


​This is the error I get :

getNext() failed for query 'SELECT
orgidStr,idStr,name,code,description,price,images,categoriesStr,enddate_solar,begin_date_solar,status_solar,current_stock_solar,retprice_solar,distprice_solar,listprice_solar,mfgprice_solar,out_of_stock_solar,hide_product_solar,saleprice_solar,metakey_solar,sales_enabled,new_product,has_sku,configurable,rating,updatedAt,comparable,hide_price
FROM products'

:com.mongodb.MongoException$Network: can't call something : /
​<<IP ADDRESS>>
:27017/
​<<DB NAME>>


        
Caused by: java.io.IOException: couldn't connect to [/
​
​<<IP ADDRESS>>:27017] bc:java.net.SocketTimeoutException: connect timed out

​Have anyone else gone through this kind of issue ?




On Tue, Mar 28, 2017 at 6:20 PM, Rick Leir <rl...@leirtech.com> wrote:

> Abhijit
> In Mongo you probably have one JSON record per document. You can post that
> JSON record to Solr, and the JSON fields get indexed. The github project
> you mention does just that. If you use the Solr managed schema then Solr
> will automatically define fields based on what it receives. Otherwise you
> will need to carefully design a schema.xml.
> Cheers -- Rick
>
> On March 28, 2017 6:08:40 PM EDT, Abhijit Pawar <
> abhijit.ibizs...@gmail.com> wrote:
> >Hello All,
> >
> >I am working on a requirement to index field of type JSON (in mongoDB
> >collection) in SOLR 5.4.0.
> >
> >I am using mongo-jdbc-dih which I found on GitHub :
> >
> >https://github.com/hrishik/solr-mongodb-dih
> >
> >However I could not find a fieldtype on Apache SOLR wiki page which
> >would
> >support JSON datatype in mongoDB.
> >
> >Can someone please recommend a way to include datatype / fieldtype in
> >SOLR
> >schema to support or index JSON data field from mongoDB.
> >Thanks.
> >
> >R​egards,
> >
> >Abhijit​
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.

Reply via email to