Skip to content

IBX-9845: Upgraded Solr to version 9.8.1 #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Aug 4, 2025
Merged

IBX-9845: Upgraded Solr to version 9.8.1 #95

merged 13 commits into from
Aug 4, 2025

Conversation

mikadamczyk
Copy link
Contributor

@mikadamczyk mikadamczyk commented May 29, 2025

🎫 Issue IBX-9845

Related PRs:

Description:

This PR introduces support for Solr 9.8.1, in addition to maintaining compatibility with Solr 7.7.x and 8.11.x.
The update affects initialization scripts, configuration file selection, and CI workflows, ensuring smooth integration and automated testing for the latest Solr LTS.

  • The script .github/init_solr.sh was updated to support Solr 9.8.1, including logic to choose different config files based on the Solr version (Solr 9.x uses managed-schema and new custom-fields-types).
  • There are changes to how TEMPLATE_DIR is set up for Solr 9.x (now includes /conf)
  • The default SOLR_VERSION is now set to 9.8.1
  • In the init_solr.sh, the flag -Dsolr.disable.shardsWhitelist=true is no longer used when starting Solr 9.x. For older versions , it is still used. In older Solr versions, the shards whitelist was a security feature restricting which hosts Solr could communicate with in distributed queries. Setting -Dsolr.disable.shardsWhitelist=true was often necessary in development and CI to allow all URLs. In Solr 9, this setting was replaced by allowUrls in the configuration.
  • No Usage of -Dsolr.disable.allowUrls=true. It would globally disable Solr’s allowUrls security (making the server accept any URLs in distributed queries). It's a security anti-pattern for production and is not recommended even for testing, unless absolutely necessary. Instead, the script configures the allowUrls property specifically in the configuration using the ALLOW_URLS environment variable and the generate-solr-config.sh script.
  • Changes in MapLocationDistanceRange.php and move to LatLonPointSpatialField. The location field’s fieldType was updated from Solr's legacy spatial type LatLonType to LatLonPointSpatialField in Solr 9.

If Solr version 9 is used I,t is obligatory to set:

ibexa_solr:
    version: '9.8.1'

For QA:

Documentation:

@mikadamczyk mikadamczyk changed the base branch from main to 4.6 May 29, 2025 08:03
@mikadamczyk mikadamczyk changed the title Solr 9 tests IBX-9845: Upgraded Solr to version 9.8.1 Jun 12, 2025
@mikadamczyk mikadamczyk marked this pull request as ready for review June 24, 2025 06:02
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
3.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

{
if (is_array($criterion->value)) {
$minDistance = $criterion->value[0];
$maxDistance = $criterion->value[1] ?? 63510;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why 63510 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, it comes from the direct conversion of https://github.com/ibexa/solr/pull/95/files#diff-1127a1f6be52315ed65f6d9331bab2c616849de0124f37a619b61043c88f347aR70 . I suppose the literal 63510 there is just a “magic number” fallback for the upper bound of the distance filter. It guarantees that, if the user didn’t supply a maximum distance, we’ll end up filtering out nothing on the high end.
Maybe it could be replaced by 20038, if needed. For example, as a MAX_EARTH_DISTANCE_KM or something.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
3.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Copy link

@tomaszszopinski tomaszszopinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA approved on Ibexa DXP 5.0 exp.

@adamwojs adamwojs merged commit 1b37f6f into 4.6 Aug 4, 2025
21 of 22 checks passed
@adamwojs adamwojs deleted the test-solr9 branch August 4, 2025 07:32
@mnocon mnocon added Doc needed The changes require some documentation and removed Doc needed The changes require some documentation labels Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants