Making WordPress.org

Changeset 13779


Ignore:
Timestamp:
06/06/2024 04:24:20 AM (2 years ago)
Author:
dd32
Message:

Plugin Directory: Search: Switch from searching title_en.ngram to title_en.engram.

This has an impact upon partial word searches, by using engram (which is an edge-match) only partial words anchored to the first character will be matched, rather than 3-5 character strings within (or ending) larger words.

This appears to resolve some issues with search results where seemingly irrelevant plugins are returned, simply because the plugin name (and search term) contains a lot of common 3-letter phrases (ide, ing, ion, ive, etc).

This is a test, and may be reverted after review.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-search.php

    r13778 r13779  
    290290                        'multi_match' => [
    291291                                'query'  => $search_phrase,
    292                                 'fields' => $this->localise_es_fields( [ 'title.ngram' ] ),
     292                                'fields' => $this->localise_es_fields( [ 'title.engram' ] ),
    293293                                'type'   => 'phrase',
    294294                                'boost'  => 2,
Note: See TracChangeset for help on using the changeset viewer.