lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Obernberger <joseph.obernber...@gmail.com>
Subject Re: Modify Schema - Schema API
Date Wed, 10 Sep 2014 16:44:05 GMT
Wow - that's really cool!  Thank you!

-Joe

On Wed, Sep 10, 2014 at 12:29 PM, Anshum Gupta <anshum@anshumgupta.net>
wrote:

> You don't need to bring down the shards/collections, instead here's what
> you can do:
> * Retain the filename ("managed_schema", if you didn't change the default
> resource name).
> * Edit the file locally
> * Upload it to replace the current zk file.
> * Reload the collection(s).
> * Reindex
>
> Here's another thing you can do:
> * Upload the updated configs to zk
> * Create a new collection (different name) using the new configs
> * Reindex data to the new collection.
> * Use collection aliasing to swap the old/new collections.
> (http://www.anshumgupta.net/2013/10/collection-aliasing-in-solrcloud.html)
>
> All this while, you wouldn't really need to shut down the Solr
> cluster/collection etc.
>
> On Wed, Sep 10, 2014 at 8:56 AM, Joseph Obernberger <
> joseph.obernberger@gmail.com> wrote:
>
> > Thank you - yes that was my question.  I should have stated that it was
> for
> > SolrCloud and hence a managed schema.  Could I bring down the shards,
> edit
> > the managed schema on zookeeper, fire the shards back up and re-index?
> >
> > -Joe
> >
> > On Wed, Sep 10, 2014 at 11:50 AM, Anshum Gupta <anshum@anshumgupta.net>
> > wrote:
> >
> > > Hi Joseph,
> > >
> > > It isn't supported by an exiting REST API (if that was your question)
> but
> > > you can always edit the schema manually (if it isn't managed), upload
> the
> > > new schema and reload the collections (or cores in case of
> non-SolrCloud
> > > mode).
> > >
> > > Do remember that changing the field type might require you to reindex
> > your
> > > data.
> > >
> > > There's an open JIRA for that one and I think someone would get to it
> > > sometime in the reasonably near future.
> > > JIRA: https://issues.apache.org/jira/browse/SOLR-5289
> > >
> > > On Wed, Sep 10, 2014 at 8:05 AM, Joseph Obernberger <
> > > joseph.obernberger@gmail.com> wrote:
> > >
> > > > In addition to adding new fields to the schema, is there a way to
> > modify
> > > an
> > > > existing field?  If I created a field called userID as a long, but
> > > decided
> > > > later that it should be a string?
> > > > Thank you!
> > > >
> > > > -Joe
> > > >
> > >
> > >
> > >
> > > --
> > >
> > > Anshum Gupta
> > > http://www.anshumgupta.net
> > >
> >
>
>
>
> --
>
> Anshum Gupta
> http://www.anshumgupta.net
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message