ilscipio/scipio-erp

View on GitHub
applications/solr/config/solrconfig.properties

Summary

Maintainability
Test Coverage
# Solr configuration for custom Ofbiz solr modules
# See README.txt for basic Solr configuration documentation.

# Global solr enable/disable flag
# Mainly for debugging; scipio/shop largely depends on solr to work.
# NOTE: Setting false does not prevent webapp from loading; set enabled="false" in ofbiz-component.xml
solr.enabled=true

# Local Scipio Solr configuration/schema version number
# This number is increased by Scipio team whenever a significant change is done to the schema
# or other parts of solr code that requires a rebuildSolrIndex invocation; 
# see also solr.index.rebuild.autoRun.ifConfigChange
solr.config.version=1.0.24

# The deployed/configured Solr version
# NOTE: Use SolrUtil to read this; could be removed in future.
solr.version=7.7.3

# Custom/client configuration/schema version number
# If set, it is used INSTEAD of solr.config.version.
# May be used to insulate client configuration from merges from upstream Scipio.
# WARN: If used, you must take care to increase this when solr.config.version increases upstream.
solr.config.version.custom=

# Custom/client configuration/schema extra version number
# If this is set, it will be APPENDED to solr.config.version[.custom] (separated by a '.').
# May be used to give client projects their own schema version but still respond
# to upstream solr.config.version changes, in a safe way.
solr.config.version.extra=

# Webapp access details
solr.webapp.protocol=http
solr.webapp.domainName=localhost
# By default, port is same as Ofbiz server, but can be overridden here.
solr.webapp.portOverride=
solr.webapp.path=/solr
solr.webapp.server=default-server

# Core settings
solr.core.default=product

# Debug settings
solr.debug=false

# Default Solr basic HTTP auth credentials, sent with each solr query/indexing call
# See the Authentication section of README.txt for details.
# WARNING: Plaintext!
solr.query.connect.login.username=
solr.query.connect.login.password=
solr.update.connect.login.username=
solr.update.connect.login.password=
solr.admin.connect.login.username=
solr.admin.connect.login.password=

# If true, the HttpClient used to connect to Solr is reused between calls
# to optimize TCP connection reuse and pooling.
# NOTE: In case of issues, uncomment HttpClient debug log in framework/base/config/log4j2.xml
solr.query.connect.reuseClient=true
solr.update.connect.reuseClient=true
solr.admin.connect.reuseClient=true

# Max connections per HttpClient - only meaningful if reuseClient=true
solr.query.connect.maxConnections=10000
solr.query.connect.maxConnectionsPerHost=10000
solr.update.connect.maxConnections=10000
solr.update.connect.maxConnectionsPerHost=10000
solr.admin.connect.maxConnections=10000
solr.admin.connect.maxConnectionsPerHost=10000

# Local connect timeouts, in milliseconds
solr.query.connect.connectTimeout=30000
solr.query.connect.socketTimeout=30000
solr.update.connect.connectTimeout=
solr.update.connect.socketTimeout=
solr.admin.connect.connectTimeout=
solr.admin.connect.socketTimeout=

# If true, ensures TCP delay (naggle) is disabled
# TODO: flag not implemented due to solr code issues (uses client default)
#solr.query.connect.noDelay=
#solr.update.connect.noDelay=
#solr.admin.connect.noDelay=

# Sets TCP connection keep-alive setting explicitly (default: true)
# TODO: flag not implemented due to solr code issues (uses client default - true/enabled)
#solr.query.connect.keepAlive=
#solr.update.connect.keepAlive=
#solr.admin.connect.keepAlive=

# Global solr ECA service toggling
# Set to true to enable solr indexing using ECAs/SECAs.
# If set to false, solr services meant to be triggered by ECA/SECA will not execute and will "succeed" silently.
# This setting is equivalent to but overridden by the "ofbiz.solr.eca.enabled" system property.
solr.eca.enabled=true

# If true, the addToSolr and other services meant to be called by ECA/SECA will only update
# products if the solr webapp is detected as running (to avoid issues during data load or other circumstances).
# Try to set to false if you encounter any issues with this check during normal execution.
solr.eca.useSolrWebappLoadedCheck=true

# If true, connection errors during ECAs/SECAs are treated as warnings/failures rather than errors.
# If false, connection errors are treated as errors, and parent transactions are aborted.
solr.eca.treatConnectErrorNonFatal=true

# If true, when addToSolr is called but SOLR was not updated for whatever reason 
# (failure, not loaded, or ECA inserts disabled),
# the index will be marked as dirty. 
# NOTE: This can have performance implications, depending on other settings.
solr.eca.markDirty.enabled=true

# If true, will not mark dirty if the reason for lack of index update was missing webapp (solr not loaded)
# NOTE: Usually want to set this true to prevent extra slow updates during seeding, but false is safer.
solr.eca.markDirty.noWebappCheck=true

# If async, solr ECAs will execute asynchronously, which is faster but requires more non-persisted threads and
# removes the guarantee that solr updates execute on return of services that trigger product changes.
# If sync, solr ECAs run synchronously, which is more predictable but may block on substantial product changes.
solr.eca.service.mode=async

# If true, rebuildSolrIndexAuto (which runs on startup, among other possible times) will be enabled (unless job manually removed)
# If false, even if job for rebuildSolrIndexAuto called, will not run
solr.index.rebuild.autoRun.enabled=true

# If true, rebuildSolrIndexAuto calls will only execute if data is dirty or unknown status
solr.index.rebuild.autoRun.onlyIfDirty=true

# If true, rebuildSolrIndexAuto will execute when the solr.config.version number has changed (e.g., schema modified)
solr.index.rebuild.autoRun.ifConfigChange=true

# If true, rebuildSolrIndexAuto waits for Solr to be fulled loaded and ready before trying to index
solr.index.rebuild.autoRun.waitSolrReady=true

# If true, rebuildSolrIndexAuto will always execute on startup (but not at other times) regardless of any settings above
# NOTE: This can be set on command line with -Dscipio.solr.index.rebuild.startup.force=true, -Dscipio.solr.reindex.startup.force=true (legacy) or ./ant start[-debug]-reindex-solr
# This property currently does not prevent crashed job rescheduling, but the ant target start[-debug]-reindex-solr target does (see service.properties#job.crashed.ignore.filter).
# NOTE: -Dscipio.solr.index.rebuild.startup.force=false can also be used to prevent solr startup reindex, but the property in this file ignores "false" (legacy/compatibility);
# as a workaround, you may set "N" here to prevent solr startup reindex instead of "false" (special case - does not apply to other properties).
solr.index.rebuild.startup.force=

# Max number of records (products) to read into memory and index at a time - for scalability
solr.index.rebuild.record.buffer.size=1000

# If true, rebuildSolrIndex will (by default): clear product caches, then use caching during indexing,
# and then clear caches again (for memory reasons - otherwise cache may be filled with rarely-used records).
# This can speed up indexing at the expense of disturbing the cache (only meaningful in production).
# Does NOT apply to ECAs, so this is limited use in practice.
# NOTE: 2020-05-15: It's no longer recommended to use this as useIndexerCache is safer, more reliable, covers a portion of this and works for ECAs.
solr.index.rebuild.clearAndUseCache=false

# If true (now default), a special cache is used for SolrDocBuilder to reuse lookups between products during indexing runs (ECA or rebuild), where possible.
# If false (old), every product looks up info again from database (with no entity cache by default).
solr.index.rebuild.indexerCache.enable=true

# Determines the max size of the product cache for the indexer cache. Unlike category data, product data can get too big so
# only this number of records are cached in memory during an indexing run. Generally, you want it higher than the max number of variants for virtual product.
# It can also be set to 0 to disable this form of caching (but not the category data). It should be lower than solr.index.rebuild.record.buffer.size.
solr.index.rebuild.indexerCache.productCacheSize=100

# Default factoring for indexing operations
# NOTE: Currently only one global factory is possible, as indexing is product-centric instead of store-centric.
solr.index.indexer.factoryClass=com.ilscipio.scipio.solr.SolrDocBuilder$Factory

# Default sleep time (milliseconds) between Solr availability checks 
solr.service.waitSolrReady.sleepTime=3000
# Default max times to check (max wait time ~= sleepTime * maxChecks)
solr.service.waitSolrReady.maxChecks=10

# Name of the service that registerUpdateToSolr should delegate to for Solr index updates (default: updateToSolr);
# it must implement the interface of updateToSolr service and behave similarly.
solr.service.registerUpdateToSolr.updateSrv=updateToSolr

# Locales to use when indexing product content (titles, descriptions, etc.) into solr.
# If empty, uses general.properties/locales.available.
solr.content.locales=
#solr.content.locales=en,de,fr

# Forced default content locale for product titles, descriptions, etc.
# Normally this will be read from ProductStore.defaultLocaleString; you should ONLY force a default locale
# here for non-standard or temporary configurations.
# If empty, ProductStore.defaultLocaleString is used.
solr.content.locales.default.force=

# Fallback default content locale for product titles, descriptions, etc.
# Used when cannot be auto-determined any better way (e.g. ProductStore.defaultLocaleString missing/bad)
# If empty, uses general.properties/locale.properties.fallback.
solr.content.locales.default.fallback=

# Override default currency for all products/stores - overrides the default ProductStore.defaultCurrencyUomId if set
# NOTE: Generally you would only need to set this if you have multiple stores with different
# ProductStore.defaultCurrencyUomId values sharing the same products (FIXME?: this case not well-supported).
solr.content.currency.default.force=

# Fallback default currency for all products/stores - only used if ProductStore doesn't set or missing
# If not set, this uses general.properties/currency.uom.id.default.
# NOTE: Generally stores should avoid this and set ProductStore.defaultCurrencyUomId and ensure
# each product has a ProductPrice in the default store currency.
solr.content.currency.default.fallback=

# Default spellcheck dictionary name prefix to use for localized spellcheck queries (_lang_[en|...] or _dlang_[en|...] is appended)
solr.spellcheck.localDictBaseName=default

# Prefix for the default localized product target field. NOTE: should be prefix only (legacy reasons), lang code gets appended.
solr.search.user.product.defaultField=text_i18n_

# Default common fields for user product searches, comma-separated (can be overridden in shop.properties)
# NOTE: If you change this, and you need spellcheck, you will probably need to edit the solr schema
# to make the spell fields correspond to changes here (FIXME: known limitation) 
solr.search.user.product.commonFields=text_common,text_common_simple

# Extra language fields, substituted with ${lang}, comma-separated, resolve to names of extra fields to query, e.g. "text_i18n_${lang}_extra,my_field"
# NOTE: see also the *Powers settings in shop.properties for these.
shop.search.solr.product.extraLangFields=

# When logging batch operations such as indexing products, max number of records/IDs to print along with counts.
solr.log.max.id=10

# System-wide default setting for store-specific price sorting - requires reindex since config 1.0.23 (SCIPIO: 3.0.0: Added)
solr.search.storePriceSort=true