0

I am new to Solr technology and trying to re-index SOLR-4 data into another SOLR-6 master-slave setup. I have created a core in SOLR-6 with same name as that in SOLR-4 and copied schema.xml (solr-4) into SOLR-6's managed-schema of core.

Issue is that I have a date field that is indexed in solr-4 but not showing as indexed in solr-6.

Solr-4 schema snippet -

<field name="createdDate" type="tdate" indexed="true" stored="true" multiValued="false"/>

Record example in solr 4 -

<date name="createdDate">2017-04-21T20:26:33Z</date>

Solr-6 schema snippet after copying schema -

<field name="createdDate" type="tdates"/>

Record example in solr 6 -

    <arr name="createdDate">
    <date>2015-01-08T21:53:10Z</date>
    </arr>

Can anybody please guide how can I effectively migrate solr-4 data to solr-6 with same schema?

If any more information is needed, please do mention in comments.

Thanks,

Vibhav

1 Answers1

0

I have moved a Solr 4.8.1 schema to Solr 6.4.1 just a month ago.

Just use your Solr 4.x schema exactly as is in Solr 6.4.1, it should be completely compatible.

You have to worry only if you're using custom type or external libraries in order to have your schema running in Solr. In this case, you have at least to rebuild your libraries. But looking at your question does not seem to be your problem.

So, as said before, just create a new core on Solr 6.x using your old schema and start indexing your documents.

Talking about createdDate field, very likely you have this problem because of type change from tdate (solr4) to tdates (solr6).

freedev
  • 25,946
  • 8
  • 108
  • 125
  • @freedv: Thanks for responding.. I have solr 4.3 cluster and date fields are not resolved. Please refer schema and record data in question above. – Vibhav Singh Rohilla Apr 24 '17 at 07:01
  • It's not clear why you couldn't simply reuse `` for createdDate field. You should also explain why you're not reusing the old schema as were. – freedev Apr 25 '17 at 02:17
  • Hi @freedev.. I have mentioned above that I didn't modify schema on my own.. I just copied solr4 schema to solr6.. – Vibhav Singh Rohilla Apr 25 '17 at 12:21
  • You wrote this is a *Solr-4 schema snippet ` `* and this *Solr-6 schema snippet after copying schema - ``*. So you changed the schema moving from sol4 to solr6. – freedev Apr 25 '17 at 12:26
  • You also changed the type of field `createdDate` from `tdate` (solr4) to `tdates` (solr6) – freedev Apr 25 '17 at 12:27
  • Stack Overflow is a question and answer site for professional and enthusiast programmers. we cannot guide you to migrate data, you should just ask a question and provide a [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve). – freedev Apr 25 '17 at 12:30