Skip to content

Commit

Permalink
fixup! IBX-6649: Added support for spell checking
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwojs committed Nov 4, 2023
1 parent 4ec89f0 commit 4756f6f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bin/generate-solr-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,12 @@ else
fi

# Adapt autoSoftCommit to have a recommended value, and remove add-unknown-fields-to-the-schema
sed -i.bak '/<updateRequestProcessorChain name="add-unknown-fields-to-the-schema".*/,/<\/updateRequestProcessorChain>/d' $DESTINATION_DIR/solrconfig.xml
sed -i.bak2 's/${solr.autoSoftCommit.maxTime:-1}/${solr.autoSoftCommit.maxTime:20}/' $DESTINATION_DIR/solrconfig.xml
sed -i '/<updateRequestProcessorChain name="add-unknown-fields-to-the-schema".*/,/<\/updateRequestProcessorChain>/d' $DESTINATION_DIR/solrconfig.xml
sed -i 's/${solr.autoSoftCommit.maxTime:-1}/${solr.autoSoftCommit.maxTime:20}/' $DESTINATION_DIR/solrconfig.xml
# Configure spellcheck component
sed -i 's/<str name="field">_text_<\/str>/<str name="field">meta_content__text_t<\/str>/' $DESTINATION_DIR/solrconfig.xml
# Add spellcheck component to /select handler
sed -i 's/<requestHandler name="\/select" class="solr.SearchHandler">/<requestHandler name="\/select" class="solr.SearchHandler">\n <arr name="last-components">\n <str>spellcheck<\/str>\n <\/arr>/' $DESTINATION_DIR/solrconfig.xml

if [ "$GENERATE_SOLR_TMPDIR" != "" ]; then
echo Removing temp dir: $GENERATE_SOLR_TMPDIR
Expand Down

0 comments on commit 4756f6f

Please sign in to comment.