Allow to disable exact matching on full processing

Created on 16 April 2024, 8 months ago

Problem/Motivation

This module is slowing down the search. It is not really a big deal if you have to wait 2 seconds when you submit the search, but in the context of an autocomplete search, 2 seconds is a lot. I've lower the processing level of the autocomplete and most processing doesn't run anymore which makes the search way faster, but this module doesn't respect that.

Proposed resolution

Some people might want to keep exact matching even in autocomplete mode, so I think just adding a setting to give the ability to disable the boost in the QueryInterface::PROCESSING_FULL mode would solve the issue. I've wrote some code to bring that feature and it works very well, the search goes from a few seconds to a few milliseconds.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada phjou Vancouver 🇨🇦 🇪🇺

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @phjou
  • Status changed to Needs review 8 months ago
  • 🇨🇦Canada phjou Vancouver 🇨🇦 🇪🇺
  • 🇮🇳India mitthukumawat

    The feature Disable exact match boosting on the full processing level. added with above MR. I can see a checkbox and it is functioning fine.
    Found these few coding standard issue when run the phpcs so resolved those as well in same MR.

    /modules/contrib $ phpcs --standard=Drupal  --extensions=php,module,inc,install search_api_exactmatch_boost/
    
    /modules/contrib/search_api_exactmatch_boost/src/Plugin/search_api/processor/ExactMatchBoost.php
    -------------------------------------------------------------------------------------------------------------------------------
    FOUND 7 ERRORS AND 2 WARNINGS AFFECTING 7 LINES
    -------------------------------------------------------------------------------------------------------------------------------
      72 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
      72 | ERROR   | [x] Closing brace indented incorrectly; expected 2 spaces, found 3
      98 | ERROR   | [x] Array closing indentation error, expected 8 spaces but found 10
     113 | ERROR   | [x] Comma not allowed after last value in single-line array declaration
     113 | ERROR   | [x] Expected one space after the comma, 0 found
     197 | WARNING | [ ] Line exceeds 80 characters; contains 120 characters
     198 | WARNING | [ ] Line exceeds 80 characters; contains 105 characters
     199 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
     210 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
    -------------------------------------------------------------------------------------------------------------------------------
    

    This feature is good to get merged.

  • Status changed to RTBC 8 months ago
  • 🇮🇳India mitthukumawat

    Resolved all coding standard errors.

    • phjou committed 438f6156 on 8.x-1.x
      Issue #3441378: Allow to disable exact matching on full processing
      
  • Status changed to Fixed about 2 months ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024