Package org.apache.solr.core
Class SolrConfig
java.lang.Object
org.apache.solr.core.SolrConfig
- All Implemented Interfaces:
org.apache.solr.common.MapSerializable
Provides a static reference to a Config object modeling the main configuration data for a Solr
core -- typically found in "solrconfig.xml".
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intstatic final Map<String, SolrConfig.SolrPluginInfo> protected Stringstatic final Stringstatic final intfinal CacheConfigfinal booleanfinal CacheConfigfinal CacheConfigfinal CacheConfigfinal SolrIndexConfigfinal org.apache.lucene.util.Versionfinal intstatic final Stringstatic final List<SolrConfig.SolrPluginInfo> final intfinal CacheConfigfinal intfinal intfinal intprotected SolrConfig.UpdateHandlerInfofinal booleanfinal booleanfinal Map<String, CacheConfig> -
Constructor Summary
ConstructorsConstructorDescriptionSolrConfig(Path instanceDir, String name) TEST-ONLY: Creates a configuration instance from an instance directory and file name -
Method Summary
Modifier and TypeMethodDescriptionprotected static longconvertHeapOptionStyleConfigStringToBytes(String configStr) Converts a Java heap option-like config string to bytes.Generates a String ID to represent theSolrConfigorg.apache.solr.common.ConfigNodefetches a child node by name.org.apache.solr.common.ConfigNodestatic ConfigOverlaygetConfigOverlay(SolrResourceLoader loader) intintgetName()getPluginInfo(String type) getPluginInfos(String type) SolrConfig keeps a repository of plugins by the type.intprotected SolrConfig.UpdateHandlerInfomaxPackageVersion(String pkg) The version of package that should be loaded for a given package name This information is stored in the params.json in the same configset If params.json is absent or there is no corresponding version specified for a given package, this returns a null and the latest is used by the callerstatic final org.apache.lucene.util.VersionparseLuceneVersionString(String matchVersion) static SolrConfigreadFromResourceLoader(SolrResourceLoader loader, String name, Properties substitutableProperties) readPluginInfos(SolrConfig.SolrPluginInfo info, boolean requireName, boolean requireClass)
-
Field Details
-
DEFAULT_CONF_FILE
- See Also:
-
MIN_PREFIX_QUERY_TERM_LENGTH
- See Also:
-
DEFAULT_MIN_PREFIX_QUERY_TERM_LENGTH
public static final int DEFAULT_MIN_PREFIX_QUERY_TERM_LENGTH- See Also:
-
plugins
-
classVsSolrPluginInfo
-
booleanQueryMaxClauseCount
public final int booleanQueryMaxClauseCount -
prefixQueryMinPrefixLength
public final int prefixQueryMinPrefixLength -
filterCacheConfig
-
queryResultCacheConfig
-
documentCacheConfig
-
fieldValueCacheConfig
-
featureVectorCacheConfig
-
userCacheConfigs
-
useFilterForSortedQuery
public final boolean useFilterForSortedQuery -
queryResultWindowSize
public final int queryResultWindowSize -
queryResultMaxDocsCached
public final int queryResultMaxDocsCached -
enableLazyFieldLoading
public final boolean enableLazyFieldLoading -
indexConfig
-
updateHandlerInfo
-
maxWarmingSearchers
public final int maxWarmingSearchers -
useColdSearcher
public final boolean useColdSearcher -
luceneMatchVersion
public final org.apache.lucene.util.Version luceneMatchVersion -
dataDir
-
slowQueryThresholdMillis
public final int slowQueryThresholdMillis
-
-
Constructor Details
-
SolrConfig
TEST-ONLY: Creates a configuration instance from an instance directory and file name- Parameters:
instanceDir- the directory used to create the resource loadername- the configuration name used by the loader if the stream is null- Throws:
IOException
-
-
Method Details
-
readFromResourceLoader
public static SolrConfig readFromResourceLoader(SolrResourceLoader loader, String name, Properties substitutableProperties) -
parseLuceneVersionString
-
getConfigOverlay
-
getInitParams
-
loadUpdatehandlerInfo
-
convertHeapOptionStyleConfigStringToBytes
Converts a Java heap option-like config string to bytes. Valid suffixes are: 'k', 'm', 'g' (case insensitive). If there is no suffix, the default unit is bytes. For example, 50k = 50KB, 20m = 20MB, 4g = 4GB, 300 = 300 bytes- Parameters:
configStr- the config setting to parse- Returns:
- the size, in bytes. -1 if the given config string is empty
-
readPluginInfos
public List<PluginInfo> readPluginInfos(SolrConfig.SolrPluginInfo info, boolean requireName, boolean requireClass) -
getRequestParsers
-
getHttpCachingConfig
-
getUpdateHandlerInfo
-
getDataDir
-
getPluginInfos
SolrConfig keeps a repository of plugins by the type. The known interfaces are the types.- Parameters:
type- The key is FQN of the plugin class there are a few known types : SolrFormatter, SolrFragmenter SolrRequestHandler,QParserPlugin, QueryResponseWriter,ValueSourceParser, SearchComponent, QueryConverter, SolrEventListener, DirectoryFactory, IndexDeletionPolicy, IndexReaderFactory,TransformerFactory
-
getPluginInfo
-
getMultipartUploadLimitKB
public int getMultipartUploadLimitKB() -
getFormUploadLimitKB
public int getFormUploadLimitKB() -
toMap
- Specified by:
toMapin interfaceorg.apache.solr.common.MapSerializable
-
getSubstituteProperties
-
getOverlay
-
getRequestParams
-
maxPackageVersion
The version of package that should be loaded for a given package name This information is stored in the params.json in the same configset If params.json is absent or there is no corresponding version specified for a given package, this returns a null and the latest is used by the caller -
refreshRequestParams
-
getResourceLoader
-
getZnodeVersion
public int getZnodeVersion() -
getName
-
getResourceName
-
get
fetches a child node by name. An "empty node" is returned if the child does not exist This never returns a null -
get
-
effectiveId
Generates a String ID to represent theSolrConfigRelies on the name of the SolrConfig,
String.hashCode()to generate a "unique" id for the solr.xml data (including substitutions), and the version of the overlay. These 3 pieces of data should combine to make a "unique" identifier for SolrConfigs, since those are ultimately all inputs to modifying the solr.xml result.
-