Re: Exception is thrown when using TimestampUpdateProcessorFactory

2016-09-19 Thread Chris Hostetter

: But I am getting below exception when i run update or through DIH. Please
: let me know how to fix this.
: 
: java.lang.NullPointerException
: at
: 
org.apache.solr.update.processor.TimestampUpdateProcessorFactory$1.getDefaultValue(TimestampUpdateProcessorFactory.java:66)


That's a really weird error.

I don't *think* Reth's suggestion will have any barring on the outcome, 
but i would love to hear if it changes anything.

the method name "getDefaultValue" in that stack trace is just 
because of how the class implements the general contract of a 
DefaultValueUpdateProcessor -- what that specific line is doing in 5.2.1 
is accessing the definition of "NOW" for the Solr Request -- metadata that 
is initialized when the request is first initiated (to ensure that a 
consistent value is used if, for example, multiple date based facets 
are computed i na single request, or multiple docs are added in a single 
request).

If you *only* got thsi error when using DIH, I would guess maybe DIH has a 
bug when it creates it's internal requests (because it's operating 
asynchronously) that prevents this value from getting initialized properly 
-- but you said "getting below exception when i run update or through DIH" 
... impliying that you get teh same exception when you do updates in other 
ways.

can you confirm/deny that you get a similar exception if/when you send 
updates *not* from DIH, and if so can you please show us the full stack 
trace of the error in that situation and provide some details regarding 
how you sent the update that caused that exception?


-Hoss
http://www.lucidworks.com/


Re: Exception is thrown when using TimestampUpdateProcessorFactory

2016-09-16 Thread Reth RM
Hi Preeti,

Try adding a default attribute to the solrtimestamp field in schema and
check if this resolves the issue.

replace  with correct default date format
https://cwiki.apache.org/confluence/display/solr/Defining+Fields


On Thu, Sep 15, 2016 at 5:32 AM, preeti kumari 
wrote:

> Hi All,
>
> I am trying to get solr index time as solrtimestamp field.
>
>
>  omitNorms="true"/>
>
> I am using solr 5.2.1 in solr cloud mode.
>
>
>  
>  
>solrtimestamp
>   
>   
> update-script.js
> 
>   example config parameter
> 
>  xnum,xnum2
>   
> 
> 
>  
>
> But I am getting below exception when i run update or through DIH. Please
> let me know how to fix this.
>
> java.lang.NullPointerException
> at
> org.apache.solr.update.processor.TimestampUpdateProcessorFactor
> y$1.getDefaultValue(TimestampUpdateProcessorFactory.java:66)
> at
> org.apache.solr.update.processor.AbstractDefaultValueUpdateProc
> essorFactory$DefaultValueUpdateProcessor.processAdd(
> AbstractDefaultValueUpdateProcessorFactory.java:91)
> at
> org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:71)
> at
> org.apache.solr.handler.dataimport.DataImportHandler$
> 1.upload(DataImportHandler.java:259)
> at
> org.apache.solr.handler.dataimport.DocBuilder.
> buildDocument(DocBuilder.java:524)
> at
> org.apache.solr.handler.dataimport.DocBuilder.
> buildDocument(DocBuilder.java:414)
> at
> org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:
> 329)
> at
> org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:232)
> at
> org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.
> java:416)
> at
> org.apache.solr.handler.dataimport.DataImporter.
> runCmd(DataImporter.java:480)
> at
> org.apache.solr.handler.dataimport.DataImporter$1.run(
> DataImporter.java:461)
>


Exception is thrown when using TimestampUpdateProcessorFactory

2016-09-15 Thread preeti kumari
Hi All,

I am trying to get solr index time as solrtimestamp field.




I am using solr 5.2.1 in solr cloud mode.


 
 
   solrtimestamp
  
  
update-script.js

  example config parameter

 xnum,xnum2
  


 

But I am getting below exception when i run update or through DIH. Please
let me know how to fix this.

java.lang.NullPointerException
at
org.apache.solr.update.processor.TimestampUpdateProcessorFactory$1.getDefaultValue(TimestampUpdateProcessorFactory.java:66)
at
org.apache.solr.update.processor.AbstractDefaultValueUpdateProcessorFactory$DefaultValueUpdateProcessor.processAdd(AbstractDefaultValueUpdateProcessorFactory.java:91)
at
org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:71)
at
org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHandler.java:259)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:524)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:414)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:329)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:232)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:416)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:480)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:461)