Re: solr 1.4 formats last_index_time for SQL differently than 1.3 ?!?

2009-10-07 Thread Mint Ekalak

I run solr successfully until i updated recently and dead at this line "where
ImportTime > '${dataimporter.last_index_time}'" from data-import.xml

i got this error

org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to
execute query: select * from newheader where ImportTime > 'Wed Oct 07
20:17:05 EST 2009'  Processing Document # 1
at
org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:72)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.(JdbcDataSource.java:253)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:210)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:39)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:58)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.nextModifiedRowKey(SqlEntityProcessor.java:81)
at
org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextModifiedRowKey(EntityProcessorWrapper.java:251)
at
org.apache.solr.handler.dataimport.DocBuilder.collectDelta(DocBuilder.java:621)
at
org.apache.solr.handler.dataimport.DocBuilder.doDelta(DocBuilder.java:259)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:173)
at
org.apache.solr.handler.dataimport.DataImporter.doDeltaImport(DataImporter.java:352)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:391)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:370)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Conversion
failed when converting date and/or time from character string.
at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1458)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:733)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:631)
at
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4016)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1414)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:176)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:151)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStatement.java:604)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.(JdbcDataSource.java:246)
... 11 more



Noble Paul നോബിള്‍  नोब्ळ्-2 wrote:
> 
> really?
> I don't remember that being changed.
> 
> what difference do u notice?
> 
> On Wed, Oct 7, 2009 at 2:30 AM, michael8  wrote:
>>
>> Just looking for confirmation from others, but it appears that the
>> formatting
>> of last_index_time from dataimport.properties (using DataImportHandler)
>> is
>> different in 1.4 vs. that in 1.3.  I was troubleshooting why delta
>> imports
>> are no longer working for me after moving over to solr 1.4 (10/2 nighly)
>> and
>> noticed that format is different.
>>
>> Michael
>> --
>> View this message in context:
>> http://www.nabble.com/solr-1.4-formats-last_index_time-for-SQL-differently-than-1.3--%21--tp25776496p25776496.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> -
> Noble Paul | Principal Engineer| AOL | http://aol.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/solr-1.4-formats-last_index_time-for-SQL-differently-than-1.3--%21--tp25776496p25783768.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: solr 1.4 formats last_index_time for SQL differently than 1.3 ?!?

2009-10-07 Thread Mint Ekalak

Work like a charm !! 

thanks Shalin 

Regards,

Mint 


Shalin Shekhar Mangar wrote:
> 
> On Thu, Oct 8, 2009 at 1:38 AM, michael8  wrote:
> 
>>
>> 2 things I noticed that are different from 1.3 to 1.4 for DataImport:
>>
>> 1. there are now 2 datetime values (per my specific schema I'm sure) in
>> the
>> dataimport.properties vs. only 1 in 1.3 (using the exact same schema). 
>> One
>> is 'last_index_time' same as 1.3, and a *new* one (in 1.4) named
>> item.last_index_time, where 'item' is my main and only entity name
>> specified
>> in my data-import.xml.  they both have the same value.
>>
>>
> This was added with SOLR-783 to enable delta imports of entities
> individually. One can specify the entity name(s) which should be imported.
> Without this it was not possible to correctly figure out deltas on a
> per-entity basis.
> 
> 
>> 2. in 1.3, the datetime passed to SQL used to be, e.g., '2009-10-05
>> 14:08:01', but with 1.4 the format becomes 'Mon Oct 05 14:08:01 PDT
>> 2009',
>> with the day of week, name of month, and timezone spelled out.  I had
>> issue
>> with the 1.4 format with MySQL only for the timezone part, but now I have
>> a
>> different solution without using this last index date altogether.
>>
>>
> I just committed SOLR-1496 so the different date format issue is fixed in
> trunk.
> 
> 
>> I'm curious though if there's any config setting to pass to
>> DataImportHandler to specify the desired date/time format to use.
>>
>>
> There is no configuration to change this. However, you can write your own
> Evaluator to output ${dih.last_index_time} in whatever format you prefer.
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/solr-1.4-formats-last_index_time-for-SQL-differently-than-1.3--%21--tp25776496p25797806.html
Sent from the Solr - User mailing list archive at Nabble.com.