Re: Fetched but not Added Solr 8.6.2

2020-09-18 Thread Anuj Bhargava
Thanks Shawn, it worked.

However, I am getting the message - *The solrconfig.xml file for this index
does not have an operational DataImportHandler defined!*

The following lines are inserted in the solrconfig.xml

  
  
  
  


  

  db-data-config.xml

  

On Fri, 18 Sep 2020 at 15:20, Shawn Heisey  wrote:

> On 9/18/2020 1:27 AM, Anuj Bhargava wrote:
> > In managed schema, I have  > stored="true" required="false" multiValued="false" />
> >
> > Still getting the following error-
> >
> > org.apache.solr.common.SolrException: Document is missing mandatory
> > uniqueKey field: id
>
> The problem is that the document that has been fetched with DIH does NOT
> have a field named id.  Because your schema has named the id field as
> uniqueKey, that field is required -- it *must* exist in any document
> that is indexed.
>
> Your DIH config suggests that the database has a field named posting_id
> ... perhaps your Solr schema should use that field as the uniqueKey
> instead?
>
> Thanks,
> Shawn
>


Re: Fetched but not Added Solr 8.6.2

2020-09-18 Thread Shawn Heisey

On 9/18/2020 1:27 AM, Anuj Bhargava wrote:

In managed schema, I have 

Still getting the following error-

org.apache.solr.common.SolrException: Document is missing mandatory
uniqueKey field: id


The problem is that the document that has been fetched with DIH does NOT 
have a field named id.  Because your schema has named the id field as 
uniqueKey, that field is required -- it *must* exist in any document 
that is indexed.


Your DIH config suggests that the database has a field named posting_id 
... perhaps your Solr schema should use that field as the uniqueKey instead?


Thanks,
Shawn


Re: Fetched but not Added Solr 8.6.2

2020-09-18 Thread Anuj Bhargava
In managed schema, I have 

Still getting the following error-

org.apache.solr.common.SolrException: Document is missing mandatory
uniqueKey field: id
at
org.apache.solr.update.AddUpdateCommand.getIndexedId(AddUpdateCommand.java:124)
at
org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:279)
at
org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:225)
at
org.apache.solr.update.processor.LogUpdateProcessorFactory$LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:106)
at org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:80)
at
org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHandler.java:272)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:531)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:419)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:334)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:234)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:427)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:486)
at
org.apache.solr.handler.dataimport.DataImporter.lambda$runAsync$0(DataImporter.java:469)
at java.lang.Thread.run(Thread.java:748)

On Thu, 17 Sep 2020 at 15:53, Jörn Franke  wrote:

> Log file will tell you the issue.
>
> > Am 17.09.2020 um 10:54 schrieb Anuj Bhargava :
> >
> > We just installed Solr 8.6.2
> > It is fetching the data but not adding
> >
> > Indexing completed. *Added/Updated: 0 *documents. Deleted 0 documents.
> > (Duration: 06s)
> > Requests: 1 ,* Fetched: 100* 17/s, Skipped: 0 , Processed: 0
> >
> > The *data-config.xml*
> >
> > 
> > >driver="com.mysql.jdbc.Driver"
> >batchSize="-1"
> >autoReconnect="true"
> >socketTimeout="0"
> >connectTimeout="0"
> >encoding="UTF-8"
> >url="jdbc:mysql://zeroDateTimeBehavior=convertToNull"
> >user="xxx"
> >password="xxx"/>
> >
> > >deltaQuery="select posting_id from countries where
> > last_modified > '${dataimporter.last_index_time}'">
> >
> >
> > 
>


Re: Fetched but not Added Solr 8.6.2

2020-09-17 Thread Anuj Bhargava
SolrWriter
Error creating document :

On Thu, 17 Sep 2020 at 15:53, Jörn Franke  wrote:

> Log file will tell you the issue.
>
> > Am 17.09.2020 um 10:54 schrieb Anuj Bhargava :
> >
> > We just installed Solr 8.6.2
> > It is fetching the data but not adding
> >
> > Indexing completed. *Added/Updated: 0 *documents. Deleted 0 documents.
> > (Duration: 06s)
> > Requests: 1 ,* Fetched: 100* 17/s, Skipped: 0 , Processed: 0
> >
> > The *data-config.xml*
> >
> > 
> > >driver="com.mysql.jdbc.Driver"
> >batchSize="-1"
> >autoReconnect="true"
> >socketTimeout="0"
> >connectTimeout="0"
> >encoding="UTF-8"
> >url="jdbc:mysql://zeroDateTimeBehavior=convertToNull"
> >user="xxx"
> >password="xxx"/>
> >
> > >deltaQuery="select posting_id from countries where
> > last_modified > '${dataimporter.last_index_time}'">
> >
> >
> > 
>


Re: Fetched but not Added Solr 8.6.2

2020-09-17 Thread Jörn Franke
Log file will tell you the issue.

> Am 17.09.2020 um 10:54 schrieb Anuj Bhargava :
> 
> We just installed Solr 8.6.2
> It is fetching the data but not adding
> 
> Indexing completed. *Added/Updated: 0 *documents. Deleted 0 documents.
> (Duration: 06s)
> Requests: 1 ,* Fetched: 100* 17/s, Skipped: 0 , Processed: 0
> 
> The *data-config.xml*
> 
> 
>driver="com.mysql.jdbc.Driver"
>batchSize="-1"
>autoReconnect="true"
>socketTimeout="0"
>connectTimeout="0"
>encoding="UTF-8"
>url="jdbc:mysql://zeroDateTimeBehavior=convertToNull"
>user="xxx"
>password="xxx"/>
>
>deltaQuery="select posting_id from countries where
> last_modified > '${dataimporter.last_index_time}'">
>
>
> 


Fetched but not Added Solr 8.6.2

2020-09-17 Thread Anuj Bhargava
We just installed Solr 8.6.2
It is fetching the data but not adding

Indexing completed. *Added/Updated: 0 *documents. Deleted 0 documents.
(Duration: 06s)
Requests: 1 ,* Fetched: 100* 17/s, Skipped: 0 , Processed: 0

The *data-config.xml*