perf(2meet-data-optimizer-hivepress-addon): index the numeric listing columns HivePress filters and sorts on
- hp_listing_core declares indexes on hp_hourly_rate and hp_rating_count; core adds them in place (WP-CLI / WP-Cron), the pinned schema hash is unchanged - Verify: unit 145, integration 52, phpcs; dev36 902k listings (SHOW INDEX, EXPLAIN) - PR: PR-090
This commit is contained in:
@@ -257,7 +257,16 @@ final class TMDO_HivePress_Entity_Groups {
|
||||
'label' => 'Hourly rate',
|
||||
),
|
||||
),
|
||||
array( 'post_types' => array( 'hp_listing' ) )
|
||||
array(
|
||||
'post_types' => array( 'hp_listing' ),
|
||||
// Filtered and sorted on by HivePress search. Declared as indexes
|
||||
// (added in place) rather than `searchable`, which would change
|
||||
// the schema hash and rebuild a table that may hold aeav_only data.
|
||||
'indexes' => array(
|
||||
'hourly_rate' => array( 'hp_hourly_rate' ),
|
||||
'rating_count' => array( 'hp_rating_count' ),
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user