Upgrading Solr 6.3.0 to 7.5.0 without having to re-index

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Upgrading Solr 6.3.0 to 7.5.0 without having to re-index

Ritesh Kumar-2
Hello Team,

I have been trying to upgrade Solr 6.3.0 to 7.5.0 and I do not want to
re-index. I tried it using the Index Upgrader Tool
<https://lucene.apache.org/solr/guide/7_5/indexupgrader-tool.html>. The
tool did its part and the current index is according to the current file
format.

The problem I am facing is with fields which have docValues enabled in the
current configuration but was not in the earlier configuration.
The error I get is
*java.lang.IllegalStateException: unexpected docvalues type NONE for field
'abc' (expected one of [SORTED, SORTED_SET]). Re-index with correct
docvalues type.*

Field type in old configuration - string (solr.StrField)   indexed and
stored set to true.
Field type in new configuration - solr.SortableTextField (docValues enabled)

Is there any way I can upgrade with the current field configuration without
having to re-index?

Best,

Ritesh Kumar
Reply | Threaded
Open this post in threaded view
|

Re: Upgrading Solr 6.3.0 to 7.5.0 without having to re-index

Shawn Heisey-2
On 4/17/2019 3:52 AM, Ritesh Kumar wrote:
> Field type in old configuration - string (solr.StrField)   indexed and
> stored set to true.
> Field type in new configuration - solr.SortableTextField (docValues enabled)

On your schema, you have changed the field class -- from StrField to
SortableTextField.  Which, by the way, isn't going to work without a
reindex even if there are no docValues problems.  You also changed the
docValues flag, which can sometimes change the docValues type at the
Lucene level.

If a field has its Lucene docValues type changed, indexing is going to
fail.  The index will have to be completely deleted, restarted, and
rebuilt from scratch.  If the index directory is not deleted completely,
then the error you saw will continue even through a reindex.

Thanks,
Shawn