Re: Help with error on indexing mongoDB document by Solr DataImportHandler

2018-08-14 Thread Wendy2
H Shawn, Thank you very much for your response! Solr DataImportHandler "could not" directly index MongoDB collections. I used open source SolrMongoImporter project (https://github.com/james75/SolrMongoImporter) on top of Solr DIH to to directly index data of MongoDB collections. What I did was

Re: Help with error on indexing mongoDB document by Solr DataImportHandler

2018-08-13 Thread Shawn Heisey
On 8/13/2018 8:56 AM, Wendy2 wrote: Hi Solr users:I encountered the following error when indexing MongoDB data by using Solr DataImportHandler:org.apache.solr.common.SolrException: TransactionLog doesn't know how to serialize class org.bson.types.ObjectId; try implementing ObjectResolver? The b

Re: Help with error on indexing mongoDB document by Solr DataImportHandler

2018-08-13 Thread Wendy2
Update: I resolved this issue by checking key:value to convert ObjectId to String: if(value instanceof ObjectId) { map.put(key, (String) value.toString()); } else { .. } A Solr happy user :-) -- Sent from: http://lucene.472066.n3.nabble.com/Solr-User-

Help with error on indexing mongoDB document by Solr DataImportHandler

2018-08-13 Thread Wendy2
Hi Solr users:I encountered the following error when indexing MongoDB data by using Solr DataImportHandler:org.apache.solr.common.SolrException: TransactionLog doesn't know how to serialize class org.bson.types.ObjectId; try implementing ObjectResolver?Is there any fix or workaround for this issue?