Skip to content

Commit 13ce071

Browse files
committed
Updated instructions
1 parent 1522ce3 commit 13ce071

File tree

2 files changed

+50
-13
lines changed

2 files changed

+50
-13
lines changed

docs/search/search_engines/solr_search_engine/install_solr.md

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,19 @@ The examples below copy from the root of your DXP project to the place you've ex
3737
``` bash
3838
# Make sure to replace the /opt/solr/ path with where you have placed Solr
3939
cd /opt/solr
40-
mkdir -p server/ibexa/template
41-
cp -R <project_root>/vendor/ibexa/solr/src/lib/Resources/config/solr/solr.languages server/ibexa/template
42-
cp -R <project_root>/vendor/ibexa/solr/src/lib/Resources/config/solr/{managed-schema.xml,custom-fields-types-solr9.xml,language-fieldtypes.xml} server/ibexa/template
43-
cp server/solr/configsets/_default/conf/{solrconfig.xml,stopwords.txt,synonyms.txt} server/ibexa/template
40+
mkdir -p server/ibexa/template/conf
41+
cp -R <project_root>/vendor/ibexa/solr/src/lib/Resources/config/solr/solr.languages server/ibexa/template/conf
42+
cp -R <project_root>/vendor/ibexa/solr/src/lib/Resources/config/solr/{managed-schema.xml,custom-fields-types-solr9.xml,language-fieldtypes.xml} server/ibexa/template/conf
43+
cp server/solr/configsets/_default/conf/{solrconfig.xml,stopwords.txt,synonyms.txt} server/ibexa/template/conf
4444
cp server/solr/solr.xml server/ibexa
4545

4646
# Modify solrconfig.xml to remove the section that doesn't agree with your schema
47-
sed -i.bak '/<updateRequestProcessorChain name="add-unknown-fields-to-the-schema".*/,/<\/updateRequestProcessorChain>/d' server/ibexa/template/solrconfig.xml
47+
sed -i.bak '/<updateRequestProcessorChain name="add-unknown-fields-to-the-schema".*/,/<\/updateRequestProcessorChain>/d' server/ibexa/template/conf/solrconfig.xml
4848

4949
# Start Solr (but apply autocommit settings below first if you need to)
50+
# The configuration path is an absolute path
5051
bin/solr -s ibexa
51-
bin/solr create_core -c collection1 -d server/ibexa/template
52+
bin/solr create_core -c collection1 -d /opt/solr/server/ibexa/template
5253
```
5354

5455
=== "Solr 7 and 8"
@@ -89,6 +90,8 @@ To set SolrCloud up follow [SolrCloud reference guide](https://solr.apache.org/g
8990

9091
### Continue Solr configuration
9192

93+
#### Configure commit frequency
94+
9295
The bundle doesn't commit Solr index changes directly on repository updates, leaving it up to you to tune this using `solrconfig.xml` as best practice suggests.
9396

9497
This setting is **required** if you want to see the changes after publish.
@@ -108,6 +111,38 @@ It's strongly recommended to set-up `solrconfig.xml` like this:
108111
</autoSoftCommit>
109112
```
110113

114+
#### Configure spellcheck
115+
116+
Configure the spellcheck component in `solrconfig.xml`:
117+
118+
```xml
119+
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
120+
<lst name="spellchecker">
121+
<str name="name">default</str>
122+
<str name="field">meta_content__text_t</str>
123+
<str name="classname">solr.DirectSolrSpellChecker</str>
124+
<str name="distanceMeasure">internal</str>
125+
<float name="accuracy">0.5</float>
126+
<int name="maxEdits">2</int>
127+
<int name="minPrefix">1</int>
128+
<int name="maxInspections">5</int>
129+
<int name="minQueryLength">4</int>
130+
<float name="maxQueryFrequency">0.01</float>
131+
</lst>
132+
</searchComponent>
133+
```
134+
135+
Add this `spellcheck` component to the `/select` request handler:
136+
137+
```xml
138+
<requestHandler name="/select" class="solr.SearchHandler">
139+
<arr name="last-components">
140+
<str>spellcheck</str>
141+
</arr>
142+
<!-- […] -->
143+
</requestHandler>
144+
```
145+
111146
### Generate Solr configuration automatically
112147

113148
The command line tool `bin/generate-solr-config.sh` generates Solr configuration automatically.

docs/update_and_migration/from_4.6/update_from_4.6.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -378,18 +378,20 @@ Run the following scripts:
378378

379379
This release adds support for [Solr 9](requirements.md#search).
380380

381-
To update Solr within an existing [[= product_name =]] project, first refer to the [Solr 9 upgrade planning](https://solr.apache.org/guide/solr/latest/upgrade-notes/major-changes-in-solr-9.html) instruction.
381+
To update Solr within an existing [[= product_name =]] project, first refer to the [Solr 9 upgrade planning](https://solr.apache.org/guide/solr/latest/upgrade-notes/major-changes-in-solr-9.html) instructions.
382382

383-
Then, perform the following additional actions:
383+
Then, follow the [instructions for setting up Solr 9 with [[= product_name =]]](/search/search_engines/solr_search_engine/install_solr.md#configure-and-start-solr) and merge them with your custom configuration.
384384

385-
1. Adjust the configuration files:
385+
Changes include:
386386

387-
- rename the `schema.xml` configuration file to [`managed-schema.xml`](https://solr.apache.org/guide/solr/latest/upgrade-notes/major-changes-in-solr-6.html#managed-schema-is-now-the-default)
388-
- replace the contents of `custom-field-types.xml` [with the new content](https://github.com/ibexa/solr/blob/v4.6.22/src/lib/Resources/config/solr/custom-fields-types-solr9.xml), replacing the [removed `LatLonType` with the `LatLonPointSpatialField` field](https://solr.apache.org/guide/solr/latest/upgrade-notes/major-changes-in-solr-7.html#deprecations-and-removed-features)
387+
1. Configuration files changes
389388

390-
1. Configure the [Solr version in the project](install_solr.md#configure-solr-version).
389+
- the `schema.xml` configuration file became [`managed-schema.xml`](https://solr.apache.org/guide/solr/latest/upgrade-notes/major-changes-in-solr-6.html#managed-schema-is-now-the-default)
390+
- the [removed `LatLonType` field is replaced by the `LatLonPointSpatialField` field](https://solr.apache.org/guide/solr/latest/upgrade-notes/major-changes-in-solr-7.html#deprecations-and-removed-features)
391391

392-
1. Finish the update by [refreshing the search index](reindex_search.md).
392+
1. New [Solr version parameter](install_solr.md#configure-solr-version)
393+
394+
Once Solr 9 is fully configured, [refresh the search index](reindex_search.md).
393395

394396
[[% include 'snippets/update/notify_support.md' %]]
395397

0 commit comments

Comments
 (0)