Labo29
Labo29

Reputation: 117

Reindexing Solr Data with different field type

I am facing an issue while reindexing Solr data.

I have indexed some documents specifying a wrong field type on the managed-schema file. Now, instead of the wrong field definition, I would like to use:

<field name="documentDate" type="date" indexed="true" stored="true"/> 

To do this I have:

After these steps I tried to reindex documents, but this fails; looking at logs:

org.apache.solr.common.SolrException: Exception writing document id 2ecde3eb2b5964b2c44362f752f7b90d to the index; possible analysis error: cannot change DocValues type from NUMERIC to SORTED_SET for field "documentDate".

How is this possible? I have removed all the documents storing the field documentDate.. How can I solve this issue?

Upvotes: 1

Views: 3725

Answers (1)

Chris
Chris

Reputation: 72

maybe try to delete the data folder in your core. You can add new fields to your schema without delete the data folder, but when you modify a field (this is my experience) then I have to delete the data folder and build a new fresh index

Upvotes: 2

Related Questions