Making WordPress.org

Changeset 14224


Ignore:
Timestamp:
12/02/2024 06:16:38 PM (4 months ago)
Author:
ryelle
Message:

Photo Directory: Prevent ElasticSearch from being used on search results.

When active, ElasticSearch takes over the searching process and ignores the customization to search custom taxonomies, and prevents the core behavior of combining search and taxonomy filtering. Disabling it allows the search code to run as expected.

See #7814, #7815

File:
1 edited

Legend:

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

    r14181 r14224  
    2020        add_filter( 'posts_groupby',        [ __CLASS__, 'tag_groupby_for_search' ], 10, 2 );
    2121        add_filter( 'posts_search_orderby', [ __CLASS__, 'tag_orderby_for_search' ], 10, 2 );
     22
     23        // Disable ElasticSearch so that the search customization can take effect.
     24        add_filter( 'jetpack_search_should_handle_query', '__return_false' );
    2225    }
    2326
Note: See TracChangeset for help on using the changeset viewer.