Skip to content
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

IBX-6649: Added support for spell checking #52

Merged
merged 5 commits into from
Dec 5, 2023
Merged

IBX-6649: Added support for spell checking #52

merged 5 commits into from
Dec 5, 2023

Conversation

adamwojs
Copy link
Member

@adamwojs adamwojs commented Sep 28, 2023

Question Answer
JIRA issue IBX-6649
Type feature
Target Ibexa version v4.6
BC breaks no
Depends on ibexa/core#276

Implemented spellchecking in Solr Search Engine based on https://solr.apache.org/guide/solr/latest/query-guide/spell-checking.html

Configuration

A) Edit Solr configuration: server/<name>/<...>/solrconfig.xml:

  1. Configure spellcheck component
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
    <lst name="spellchecker">
      <str name="name">default</str>
      <str name="field">meta_content__text_t</str>
      <str name="classname">solr.DirectSolrSpellChecker</str>
      <str name="distanceMeasure">internal</str>
      <float name="accuracy">0.5</float>
      <int name="maxEdits">2</int>
      <int name="minPrefix">1</int>
      <int name="maxInspections">5</int>
      <int name="minQueryLength">4</int>
      <float name="maxQueryFrequency">0.01</float>
    </lst>
</searchComponent>
  1. Add spellcheck component to /select request handler
<requestHandler name="/select" class="solr.SearchHandler">
    <!-- [...] -->
    <arr name="last-components">
      <str>spellcheck</str>
    </arr>
</requestHandler>

B) Restart Solr server

bin/solr restart -s <name>

Documentation

Successful build

https://github.com/ibexa/solr/actions/runs/7097242996

Checklist:

  • Provided PR description.
  • Tested the solution manually.
  • Provided automated test coverage (see IBX-6649: Added support for spell checking core#276).
  • Checked that target branch is set correctly (main for features, the oldest supported for bugs).
  • Ran PHP CS Fixer for new PHP code (use $ composer fix-cs).
  • Asked for a review (ping for example @ibexa/php-dev for back-end changes and/or @ibexa/javascript-dev for front-end changes).

@sonarcloud
Copy link

sonarcloud bot commented Oct 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@adamwojs adamwojs marked this pull request as ready for review November 4, 2023 18:04
Copy link

sonarcloud bot commented Dec 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@adamwojs adamwojs requested a review from a team December 5, 2023 12:24
@adamwojs adamwojs merged commit b60049d into main Dec 5, 2023
8 of 19 checks passed
@adamwojs adamwojs deleted the ibx_6649 branch December 5, 2023 22:51
adriendupuis added a commit to ibexa/post-install that referenced this pull request Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants