- Issue created by @navneet0693
- ๐ช๐ธSpain navneet0693 Madrid
Added search_api_spellcheck to "supported features" in Open Search backend.
- Status changed to Needs review
almost 2 years ago 12:54pm 5 February 2023 - ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
All new features must go into the 2.x branch.
- Status changed to Needs work
almost 2 years ago 12:26am 6 February 2023 - ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
Needs reroll for 2.x branch.
- ๐ช๐ธSpain navneet0693 Madrid
@kim.pepper Aah, okay. I will re-roll for 2.x. I will put the last and final patch for 1.x here, so that any one using 1.x can patch their modules and use this functionality.
In this patch, I added a data type spell check which is needed for having an aggregated field of type Open Search spell check.
- Status changed to Needs review
almost 2 years ago 4:47am 6 February 2023 - ๐ช๐ธSpain navneet0693 Madrid
@kim.pepper Here's a patch re-rolled to 2.x
The last submitted patch, 9: add_spellcheck_compatiblity--3339329-7-2x.patch, failed testing. View results โ
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- Status changed to Needs work
almost 2 years ago 5:03am 6 February 2023 - ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
Looks great. Just a couple of nitpicks:
-
+++ b/src/SearchAPI/Query/SpellCheckBuilder.php @@ -0,0 +1,50 @@ + // @see https://opensearch.org/docs/1.3/opensearch/search/did-you-mean/
Should link to latest docs?
-
+++ b/src/SearchAPI/Query/SpellCheckResultParser.php @@ -0,0 +1,63 @@ + // Suggestions are build exposing there suggest per fulltext configured
Grammar fix: Suggestions are *built* exposing *their*
Also, we need tests.
-
- ๐ช๐ธSpain navneet0693 Madrid
@kim.pepper thank you for the feedback :-D
I have added the updated doc link and Grammar fixes.
I will try to work on tests soon.
- Status changed to Needs review
almost 2 years ago 7:31am 6 February 2023 The last submitted patch, 13: add_spellcheck_compatiblity--3339329-13-2x.patch, failed testing. View results โ
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.The last submitted patch, 15: add_spellcheck_compatiblity--3339329-14-2x.patch, failed testing. View results โ
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- Status changed to Needs work
almost 2 years ago 9:33am 6 February 2023 - ๐ช๐ธSpain navneet0693 Madrid
@Medha Kumari Patch https://www.drupal.org/project/search_api_opensearch/issues/3339329#comm... โจ Feature: Support for Search API Spellcheck Needs work is rolled for Search API Open Search 2.x branch
- ๐บ๐ธUnited States gmercer
Re-rolling patch add_spellcheck_compatiblity--3339329-13-2x.patch for 2.0.0-beta3.
- ๐บ๐ธUnited States gmercer
Ahh... added the two new files in that last re-roll.
- ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
Can you convert this to a MR now please? ๐๐ป
- ๐บ๐ธUnited States gmercer
Re-rolling patch 21. It was missing the SpellcheckTextDataType file.
- ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
Re: #22 Can you convert it to a MR now please?
- ๐บ๐ธUnited States gmercer
Not sure why but composer didn't seem to like that patch #23, saying it had a malformed line. Tried locally and this applied ok.
- last update
11 months ago 45 pass, 8 fail - ๐บ๐ธUnited States gmercer
Created merge request (finally got around to this - sorry for the delay):
https://git.drupalcode.org/project/search_api_opensearch/-/merge_request... - ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
There are code style and test fails in the MR.
- First commit to issue fork.
- Status changed to Needs review
5 months ago 3:52pm 7 June 2024 - ๐ฌ๐งUnited Kingdom rupertj Bristol, UK
The tests are green now (except for some code style failures in other classes unrelated to this change).
I've tried out the code in this PR locally, and it's working well for me.
- Status changed to Needs work
5 months ago 2:10am 8 June 2024 - ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
Left some feedback.
- ๐ฌ๐งUnited Kingdom rupertj Bristol, UK
Thanks for the review kim.pepper.
I've added unit tests for the new classes SpellCheckBuilder and SpellCheckResultParser. While doing that I realised that the builder was getting passed data it never used, so I've cut down the params to SpellCheckBuilder::setSpellCheckQuery(). I also found a bug in SpellCheckResultParser::parseSpellCheckResult(), where suggestions that appeared early in the response from OpenSearch would be ignored in favour of later ones with the same score. I've replaced the logic there with code that won't ignore any suggestions, and ranks by both score and frequency to find the best ones.
I'm going to work on a functional test now.
- Status changed to Needs review
5 months ago 2:11pm 11 June 2024 - ๐ฌ๐งUnited Kingdom rupertj Bristol, UK
I've added a kernel test to cover the spell check feature. How's that looking now?
- ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
Hiding some files
- ๐ฌ๐งUnited Kingdom rupertj Bristol, UK
That call to sleep() actually came over in some code I copied from OpenSearchBackendTest. I've swopped it out in both that test and the new SpellCheckTest for a call to refresh the index. The tests both pass, and now they run faster, which is nice.
- Status changed to Fixed
5 months ago 10:52pm 12 June 2024 -
kim.pepper โ
committed 62ea6b79 on 2.x authored by
gmercer โ
Issue #3339329 by rupertj, navneet0693, gmercer, kim.pepper: Feature:...
-
kim.pepper โ
committed 62ea6b79 on 2.x authored by
gmercer โ
- ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
Committed to 2.x and 3.x thanks!
-
kim.pepper โ
committed 7ebc790f on 3.x
Issue #3339329 by rupertj, navneet0693, gmercer, kim.pepper: Feature:...
-
kim.pepper โ
committed 7ebc790f on 3.x
Automatically closed - issue fixed for 2 weeks with no activity.