lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Rogers <chris.rog...@bodleian.ox.ac.uk>
Subject Re: Problem managing Solr configsets on Zookeeper
Date Wed, 22 Feb 2017 15:25:37 GMT
Hi Erick,

Thanks for your reply.

1> Looking in the Solr UI I have only a single set of config files.
2> No, browser is not caching the page. Tried in anonymous browser and result is the same.
3> No, I don’t have a managed Schema file or managed schema factory definition. I am
using <schemaFactory class="ClassicIndexSchemaFactory"/>

Further information from my investigation into the depths of Zookeeper. Using the Zookeeper
cli, I have found the following znode structure:

[configs, …,  solr]

Within /configs there is the most recent and up-to-date config folder:

/configs/tolkien_config/schema.xml etc

… as uploaded with upconfig. However, in the /solr directory we have a second /configs folder
with the old schema.xml within it. I presume this is the collection config being used, as
it is named simply ‘tolkien’ as defined in the create collection command.

/solr/configs/tolkien/schema.xml etc

It seems that upconfig has pushed the config to zookeeper, but the config reload isn’t associating
this new config.

Should the upconfig be pushing the new config directly into that /solr/configs znode?

Best,
Chris

On 22/02/2017, 15:06, "Erick Erickson" <erickerickson@gmail.com> wrote:

    Chris:
    
    I'd check a couple of things:
    
    1> did the files get copied where you expect? Do you have only one set
    of files in the zknode configs node (admin UI>>cloud>>tree>>expand the
    appropriate branches). This seems unlikely if you did the downconfig,
    but stranger things have happened.
    
    2> Is there any chance that your _browser_ has cached the page for the
    schema file and you're seeing that?
    
    3> Chris' comment is well taken. Do you have a managed_schema file as
    well as a schema.xml file in your configset and are they different?
    You needed to change the schema factory definition in solrconfig.xml
    to _really_ use the classic schema definition. You should have
    something like this in your solrconfig.xml file:
    <schemaFactory class="ClassicIndexSchemaFactory"/>
    
    Best,
    Erick
    
    On Wed, Feb 22, 2017 at 4:54 AM, Chris Rogers
    <chris.rogers@bodleian.ox.ac.uk> wrote:
    > Hi Gus,
    >
    > Thanks for the reply, but unfortunately this is not the problem. I am using the basic
schema factory, with a directly edited schema file.
    >
    > Best,
    > Chris
    >
    > On 22/02/2017, 12:00, "Gus Heck" <gus.heck@gmail.com> wrote:
    >
    >     Hi Chris,
    >
    >     Are you perhaps using (by default) ManagedIndexSchemaFactory?
    >     https://cwiki.apache.org/confluence/display/solr/Schema+Factory+Definition+in+SolrConfig
    >
    >
    >     If so on first boot the schema.xml file is copied and then subsequently
    >     ignored in favor of the managed copy. If you do not wish to use the schema
    >     REST API and prefer editing a file, you can switch back to using
    >     ClassicIndexSchemaFactory (see link, bottom of page)
    >
    >     HTH,
    >     Gus
    >
    >     On Wed, Feb 22, 2017 at 6:16 AM, Chris Rogers <
    >     chris.rogers@bodleian.ox.ac.uk> wrote:
    >
    >     > Hi all,
    >     >
    >     > I’ve got a Zookeeper (3.4.8) / Solrcloud (6.4.0) setup with two nodes.
    >     >
    >     > I’ve successfully uploaded a collection through one of the Solr nodes:
    >     >
    >     > ~~~
    >     > bin/solr create -c tolkien -d  tolkien_config -s 2 -rf 2
    >     > ~~~
    >     >
    >     > I’ve then changed the schema.xml in the config set for this collection
(in
    >     > the /server/solr/configsets/ folder), and used the upconfig zk command to
    >     > upload it:
    >     >
    >     > ~~~
    >     > bin/solr zk upconfig -z 172.28.128.9:2181 -n tolkien_config -d
    >     > /home/bodl-tei-svc/solr-6.4.0/server/solr/configsets/tolkien_config
    >     > ~~~
    >     >
    >     > I’ve then used the collections API to reload the collections. I’ve run
    >     > this command for both Solr nodes:
    >     >
    >     > ~~~
    >     > http://localhost:8983/solr/admin/collections?action=RELOAD&name=tolkien
    >     > ~~~
    >     >
    >     > All these commands appear to execute successfully. I can confirm that the
    >     > config is successfully uploaded to Zookeeper, as the downconfig command
    >     > returns the correct files.
    >     >
    >     > HOWEVER, the content of the Schema UI in the Solr admin does not change.
    >     > Fields I had removed were still there, and fields added were not.
    >     >
    >     > I then decided to delete the collection entirely, and recreate a new
    >     > collection with the new schema, but the schema for this new collection
    >     > remains the same as the old collection!
    >     >
    >     > It’s as if the old config has been cached somewhere or something…
    >     >
    >     > Am I missing a stage or command here?
    >     >
    >     > Many thanks,
    >     > Chris
    >     >
    >     > --
    >     > Chris Rogers
    >     > Digital Projects Manager
    >     > Bodleian Digital Library Systems and Services
    >     > chris.rogers@bodleian.ox.ac.uk
    >     >
    >
    >
    >
    >     --
    >     http://www.the111shift.com
    >
    >
    

Mime
View raw message