Problem here is that you changed the schema without completely
re-indexing. In fact, when changes like this are made I typically blow
away the entire data directory or delete/recreate the collection.

At the Lucene layer, there's no schema and certainly no going back to
update already closed segments because a schema changed. So things get
confused when trying to sort since multiple segments have different
definitions for the same field. The loose coupling between the schema
and what's already in the index from an older schema definition is one
of the things we learn to deal with.

In general, when doing much of anything to the schema except _adding_
fields, I recommend starting over completely. You can do this crudely
by stopping all your servers and deleting the data directory (as in
'rm -rf data) then restarting. Or, just use the collections API to
delete then re-add the collection.

Best,
Erick

On Wed, May 27, 2015 at 9:21 AM, Gus Heck <[email protected]> wrote:
> So I did the following (seemingly) reasonable set of steps...
>
> Set up a Solr Cloud instance with mutable managed schema (data driven
> config)
> Tossed a couple docs in just to see it work.
> Tried to sort on 'title', realized title had been guessed as multivalued.
> Changed the field to type=string (as opposed to strings) using schema api
> Tried to sort on title
>
> The result is
>
> "trace": "java.lang.IllegalStateException: unexpected docvalues type
> SORTED_SET for field 'title' (expected=SORTED). Use UninvertingReader or
> index with docvalues.\n\tat
> org.apache.lucene.index.DocValues.checkField(DocValues.java:208)
>
> Resending the curl command to re-index the docs hangs
>
> However, I have not played with schemaless or the schema api before, so
> maybe I've missed something, and my steps are not reasonable, and thus this
> sanity check before I file a bug.
>
> -Gus
>
> --
> http://www.the111shift.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

  • Hmm, bug? Gus Heck
    • Re: Hmm, bug? Erick Erickson

Reply via email to