[prev in list] [next in list] [prev in thread] [next in thread] 

List:       solr-user
Subject:    Re: Maintaining variable values between transition states
From:       Shawn Heisey <apache () elyograg ! org>
Date:       2017-03-30 21:58:26
Message-ID: 62c12de0-a187-3124-f133-6bdd3a56ec17 () elyograg ! org
[Download RAW message or body]

On 3/30/2017 12:34 PM, Shashank Pedamallu wrote:
> I have some configuration variables that I need to hold in Solr as it
> switches between transient states on a transient core. What is the
> best way to do this? These variables can change value during a running
> environment. So, I need to have read and write access to the
> persistent store. Some options I was thinking was store them in
> core.properties file. But then, I did not find a way to write to
> coreProperties. Similarly for handler parameters in solrconfig.xml.
> Please let me know if there are any recommended ways to handle this case.

The way I would do this is by storing information in the Solr index. 
You could put a special document in each core, but I think I would set
up a dedicated core with a special schema to contain such information
for all the other cores.  The schema would have a field like "id" for a
uniqueKey that would have the name of the core in it, and the other
fields would each hold one piece of information (property) associated
with that core.  You would update that document before finishing the
work on that core, then you can later retrieve it with a query.  Atomic
Updates would work well with that core.

As far as your specific question about built in states like
enabling/disabling replication, and what the state will be when the core
is unloaded and then re-loaded, I do not know.

Thanks,
Shawn

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic