You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Gus Heck <gu...@gmail.com> on 2015/05/27 19:40:32 UTC

Re: Hmm, bug (schemaless/schema api)?

Ok, thanks.

Sorry for the uninformative subject line. I realized after the fact it was
not very good (ok really bad :) ).

What you say is what I had generally understood to be the case in the past
with regular static schemas, but I had hoped something newer and more
flexible was implied with the advent of an API, and the "schemaless"
configuration. Although there is a caveat at the top of the wiki page,
statements like

"When modifying the schema with the REST API, a core reload will
> automatically occur in order for the changes to be available immediately."
>

had given me hope. Guess you haven't got that far after all.

-Gus


On Wed, May 27, 2015 at 1:03 PM, Erick Erickson <er...@gmail.com>
wrote:

> 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 <gu...@gmail.com> 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: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>


-- 
http://www.the111shift.com

Re: Hmm, bug (schemaless/schema api)?

Posted by Gus Heck <gu...@gmail.com>.
That seems nice and clear. :) Interesting though, that sentence that I
picked out appears to be duplicated in the modifying schema section, which
is where I saw it initially.

-Gus

On Wed, May 27, 2015 at 2:55 PM, Steve Rowe <sa...@gmail.com> wrote:

>
> > On May 27, 2015, at 1:40 PM, Gus Heck <gu...@gmail.com> wrote:
> >
> > What you say is what I had generally understood to be the case in the
> past with regular static schemas, but I had hoped something newer and more
> flexible was implied with the advent of an API, and the "schemaless"
> configuration. Although there is a caveat at the top of the wiki page,
> statements like
> >
> > "When modifying the schema with the REST API, a core reload will
> automatically occur in order for the changes to be available immediately."
> >
> > had given me hope. Guess you haven't got that far after all.
>
> Thanks, I added a(nother) warning to that sentence.
>
> Steve
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>


-- 
http://www.the111shift.com

Re: Hmm, bug (schemaless/schema api)?

Posted by Steve Rowe <sa...@gmail.com>.
> On May 27, 2015, at 1:40 PM, Gus Heck <gu...@gmail.com> wrote:
> 
> What you say is what I had generally understood to be the case in the past with regular static schemas, but I had hoped something newer and more flexible was implied with the advent of an API, and the "schemaless" configuration. Although there is a caveat at the top of the wiki page, statements like 
> 
> "When modifying the schema with the REST API, a core reload will automatically occur in order for the changes to be available immediately." 
> 
> had given me hope. Guess you haven't got that far after all.

Thanks, I added a(nother) warning to that sentence.

Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org