Class CoreDescriptor

  • public class CoreDescriptor
    extends Object
    A Solr core descriptor
    solr 1.3
    • Constructor Detail

      • CoreDescriptor

        public CoreDescriptor​(String name,
                              Path instanceDir,
                              Properties containerProperties,
                              boolean isZooKeeperAware,
                              String... properties)
      • CoreDescriptor

        public CoreDescriptor​(String name,
                              Path instanceDir,
                              Properties containerProperties,
                              boolean isZooKeeperAware)
        Create a new CoreDescriptor with a given name and instancedir
        name - the CoreDescriptor's name
        instanceDir - the CoreDescriptor's instancedir
        containerProperties - the enclosing container properties for variable resolution
        isZooKeeperAware - whether we are part of SolrCloud or not.
      • CoreDescriptor

        public CoreDescriptor​(String coreName,
                              CoreDescriptor other)
        Create a new CoreDescriptor using the properties of an existing one
        coreName - the new CoreDescriptor's name
        other - the CoreDescriptor to copy
      • CoreDescriptor

        public CoreDescriptor​(String name,
                              Path instanceDir,
                              Map<String,​String> coreProps,
                              Properties containerProperties,
                              boolean isZooKeeperAware)
        Create a new CoreDescriptor.
        name - the CoreDescriptor's name
        instanceDir - a Path resolving to the instanceDir
        coreProps - a Map of the properties for this core
        containerProperties - the properties from the enclosing container.
        isZooKeeperAware - if true, we ar in SolrCloud mode.
    • Method Detail

      • getPersistableStandardProperties

        public Properties getPersistableStandardProperties()
        Get the standard properties in persistable form
        the standard core properties in persistable form
      • getPersistableUserProperties

        public Properties getPersistableUserProperties()
        Get user-defined core properties in persistable form
        user-defined core properties in persistable form
      • loadExtraProperties

        protected void loadExtraProperties()
        Load properties specified in an external properties file. The file to load can be specified in a properties property on the original Properties object used to create this CoreDescriptor. If this has not been set, then we look for conf/ underneath the instance dir. File paths are taken as read from the core's instance directory if they are not absolute.
      • buildSubstitutableProperties

        protected void buildSubstitutableProperties()
        Create the properties object used by resource loaders, etc, for property substitution. The default solr properties are prefixed with 'solr.core.', so, e.g., 'name' becomes ''
      • isUserDefinedProperty

        protected static boolean isUserDefinedProperty​(String propName)
        Is this property a Solr-standard property, or is it an extra property defined per-core by the user?
        propName - the Property name
        true if this property is user-defined
      • checkPropertyIsNotEmpty

        public static String checkPropertyIsNotEmpty​(String value,
                                                     String propName)
      • getPropertiesName

        public String getPropertiesName()
      • getDataDir

        public String getDataDir()
      • usingDefaultDataDir

        public boolean usingDefaultDataDir()
      • getInstanceDir

        public Path getInstanceDir()
        the core instance directory
      • getConfigName

        public String getConfigName()
        the core configuration resource name.
      • getSchemaName

        public String getSchemaName()
        the core schema resource name.
      • getName

        public String getName()
        the initial core name
      • setProperty

        public void setProperty​(String prop,
                                String val)
      • getCollectionName

        public String getCollectionName()
      • isLoadOnStartup

        public boolean isLoadOnStartup()
      • isTransient

        public boolean isTransient()
      • getUlogDir

        public String getUlogDir()
      • getCoreProperty

        public String getCoreProperty​(String prop,
                                      String defVal)
        Returns a specific property defined on this CoreDescriptor
        prop - - value to read from the properties structure.
        defVal - - return if no property found.
        associated string. May be null.
      • getSubstitutableProperties

        public Properties getSubstitutableProperties()
        Returns all substitutable properties defined on this CoreDescriptor
        all substitutable properties defined on this CoreDescriptor
      • getConfigSet

        public String getConfigSet()
      • getConfigSetPropertiesName

        public String getConfigSetPropertiesName()
      • isConfigSetTrusted

        public boolean isConfigSetTrusted()
      • setConfigSetTrusted

        public void setConfigSetTrusted​(boolean trusted)