简体   繁体   中英

Apply solr 4 schema to solr 6

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

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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM