Skip to content

Commit

Permalink
Update solrconfig 7 to control some more parameters via env variables (
Browse files Browse the repository at this point in the history
…adsabs#181)

* Removed obsolete parameter 'maxIndexingThreads'

* Added new mergePolicy parameters

* Added control over autoSoftCommit.maxTime

* Added control over useCompoundFile

* Update solrconfig.xml

Deactivated the autoSoftCommit -- can be turned on via env vars.

Co-authored-by: Roman Chyla <romanchyla@users.noreply.github.com>
  • Loading branch information
marblestation and romanchyla authored Mar 4, 2021
1 parent c278522 commit 5a80435
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
8 changes: 6 additions & 2 deletions contrib/examples/adsabs/bin/solr.in.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ SOLR_OPTS="${SOLR_OPTS} -Xss256k \
-Dmontysolr.enable.write=${MONTYSOLR_ENABLE_WRITE:-false} \
-Dmontysolr.warmSearcher=${MONTYSOLR_WARM_SEARCHER:-false} \
-Dmontysolr.load.citation_cache=${MONTYSOLR_LOAD_CITATION_CACHE:-true} \
-Dmontysolr.maxDocs=${MONTYSOLR_MAX_DOCS:-40000} \
-Dmontysolr.maxTime=${MONTYSOLR_MAX_TIME:-1800000} \
-Dmontysolr.autoCommit.maxDocs=${MONTYSOLR_MAX_DOCS:-40000} \
-Dmontysolr.autoCommit.maxTime=${MONTYSOLR_MAX_TIME:-1800000} \
-Dmontysolr.autoSoftCommit.maxTime=${MONTYSOLR_SOFT_MAX_TIME:-900000} \
-Dmontysolr.coordinate=${MONTYSOLR_COORDINATE:-true} \
-Dmontysolr.stagger.maxDelay=${MONTYSOLR_STAGGER_MAX_DELAY:-2700} \
-Dmontysolr.stagger.numInstances=${MONTYSOLR_STAGGER_NUM_INSTANCES:-3} \
Expand All @@ -96,6 +97,9 @@ SOLR_OPTS="${SOLR_OPTS} -Xss256k \
-Dsolr.citationCache.autowarmCount=${SOLR_CITATION_CACHE_AUTOWARM_COUNT:-${SOLR_CACHE_AUTOWARM_COUNT:-128}} \
-Dsolr.ramBufferSize=${SOLR_RAM_BUFFER_SIZE:-1000} \
-Dsolr.maxBufferedDocs=${SOLR_MAX_BUFFERED_DOCS:-50000} \
-Dsolr.mergePolicy.maxMergeAtOnce=${SOLR_MERGE_POLICY_MAX_MERGE_AT_ONCE:-10} \
-Dsolr.mergePolicy.segmentsPerTier=${SOLR_MERGE_POLICY_SEGMENTS_PER_TIER:-10} \
-Dsolr.useCompoundFile=${SOLR_USE_COMPOUND_FILE:-false} \
-Dmontysolr.logdir=${SOLR_LOGS_DIR} \
-DhostContext=${SOLR_HOST_CONTEXT:-solr} \
${MONTYSOLR_EXTRA_JAVA_OPTS}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@

<indexConfig>

<maxIndexingThreads>${solr.maxIndexingThreads:8}</maxIndexingThreads>

<useCompoundFile>${solr.useCompoundFile:false}</useCompoundFile>

<ramBufferSizeMB>${solr.ramBufferSize:1000}</ramBufferSizeMB>
<maxBufferedDocs>${solr.maxBufferedDocs:50000}</maxBufferedDocs>

<mergePolicyFactory class="solr.TieredMergePolicyFactory">
<int name="maxMergeAtOnce">${solr.mergePolicy.maxMergeAtOnce:10}</int>
<int name="segmentsPerTier">${solr.mergePolicy.segmentsPerTier:10}</int>
</mergePolicyFactory>

<!-- When we run several instances sharing the same index, we must
make sure that only one writer is modifying it; and other
Expand Down Expand Up @@ -87,9 +89,14 @@
</updateLog>

<autoCommit>
<maxDocs>${montysolr.maxDocs:40000}</maxDocs>
<maxTime>${montysolr.maxTime:1800000}</maxTime>
<maxDocs>${montysolr.autoCommit.maxDocs:40000}</maxDocs>
<maxTime>${montysolr.autoCommit.maxTime:1800000}</maxTime>
</autoCommit>

<!-- disabled by default -->
<autoSoftCommit>
<maxTime>${montysolr.autoSoftCommit.maxTime:-1}</maxTime>
</autoSoftCommit>


<!-- trigger core reload of the read-only instance of the same datadir
Expand Down

0 comments on commit 5a80435

Please sign in to comment.