Checkout this article for working with date types and format etc.
http://lucene.apache.org/solr/guide/6_6/working-with-dates.html

On Wed, Sep 20, 2017 at 6:32 AM, shankhamajumdar <
shankha.majum...@lexmark.com> wrote:

> Hi,
>
> I have a field with timestamp data in Cassandra for example - 2017-09-20
> 10:25:46.752000+0000.
> I am not able to import the data using Solr DataImportHandler, getting the
> bellow error in the Solr log.
>
> Caused by: java.lang.StringIndexOutOfBoundsException: String index out of
> range: -1
>
> I am able to import other datatype data from Cassandra to Solr. I am using
> below configuration
> managed-schema
> <field name="test_data1" type="string" indexed="true" stored="true"
> required="true" multiValued="false" />
>     <field name="test_data2" type="string" indexed="true" stored="true"
> required="true" multiValued="false" />
>     <field name="test_data3" type="string" indexed="true" stored="true"
> required="true" multiValued="false" />
>     <field name="upserttime" type="date"   indexed="true" stored="true"
> required="true"  multiValued="false" />
>
> dataconfig.xml
> query="SELECT test_data1,test_data2,test_data3, upserttime from
> test_table"
> autoCommit="true">
> <field column="test_data1" name="test_data1" />
> <field column="test_data2" name="test_data2" />
> <field column="test_data3" name="test_data3" />
> <field column="upserttime" name="upserttime" />
>
> Regards,
> Shankha
>
>
>
>
>
> --
> Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
>

Reply via email to