On 11/1/2017 10:04 PM, Phil Scadden wrote:
For testing, I changed to HttpSolrClient and specifying the core on process and 
commit instead of opening it as server/core. This time worked... sort of. 
Despite deleting the entire index with deletebyquery and seeing that it was 
empty in the coreAdmin, I get :

possible analysis error: cannot change DocValues type from SORTED_SET to NUMERIC for 
field "access"

I tried deleting the field in the admin interface and then adding it back in 
again in that admin interface. But, no. Still comes up with that error. I know 
deleting the index files on disk works but I don’t have access to the server. 
This is a frustrating problem.

Variations of this error happen when settings on a field with docValues="true" are changed, and the index already has documents added with the previous settings.

Each Lucene segment stores information about what kind of docValues are present for each field that has docValues, and if you change an aspect of the field (multivalued, field class, etc) and try to add a new document with that different information, Lucene will complain. The reason that deleting all documents didn't work is that when you delete documents, they are only MARKED as deleted, the segments (and deleted docs) remain on the disk.

The only SURE way to fix it is to completely delete the index directory (or directories), reload the core/collection (or restart Solr), and reindex from scratch. One thing you *might* be able to do if you don't have access to the server is delete all documents and then optimize the index, which should delete all segments and effectively leave you with a brand new empty index. I'm not 100% sure that this would take care of it, but I *think* it would.

Thanks,
Shawn

Reply via email to