Files
2meet-data-optimizer-hivepr…/docs/HIVEPRESS-COVERAGE.md
T
wpdev 99f4653b25 docs(2meet-data-optimizer-hivepress-addon): map HivePress extension meta keys and query shapes
- docs/HIVEPRESS-COVERAGE.md: read-only inventory on dev36 of the hp_* meta each post type holds (registered or not, queried or not), where the extensions keep their data (comments, taxonomies, user meta) and the query shapes a front-end crawl produced.
- Conclusion for plan D04: attribute auto-registration is not needed now — every meta key HivePress queries is registered, select attributes are taxonomies, and the unregistered keys written (hp_due_date, hp_availability, hp_warranty) are never queried; revisit for sites that add filterable or sortable number / date attributes. README links it.
- PR: PR-083
2026-09-27 09:19:09 +08:00

62 lines
3.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# HivePress coverage: what the extensions write and how HivePress queries it
Read-only inventory on **dev36** (2026-09-27): HivePress 1.7 with blocks, bookings,
favorites, marketplace, memberships, messages, requests, reviews, seo, social-links and
tags; 101,175 listings, 1,499 vendors, 709 requests. The data is seeded, so features the
seed never used show no rows — noted per line. Account pages (favorites, messages,
memberships) were not crawled (login).
## Meta keys written (rows, `hp_*`)
| Post type | Key | Rows | Registered group | Queried? |
|---|---|---|---|---|
| hp_listing | `hp_hourly_rate` | 101,157 | `hp_listing_core` | yes — filter BETWEEN, sort |
| hp_listing | `hp_price` | 100,437 | `hp_listing_core` | yes — filter BETWEEN, sort |
| hp_listing | `hp_rating`, `hp_rating_count` | 53,299 | `hp_listing_core` | `hp_rating` sort |
| hp_listing | `hp_verified` | 31,985 | `hp_listing_core` | no |
| hp_listing | `hp_featured` | 5,131 | `hp_listing_core` | yes — featured block (`= CHAR`, `meta_key` + `rand`) |
| hp_listing | `hp_warranty` | 100,401 | — | no (seed data: values are not warranty term ids; see below) |
| hp_vendor | `hp_rating`, `hp_hourly_rate`, `hp_rating_count`, `hp_verified` | 761–1,499 | `hp_vendor_core` | `hp_hourly_rate` filter, `hp_rating` sort |
| hp_vendor | `hp_availability` | 4 | — | no |
| hp_request | `hp_budget` | 709 | `hp_request_core` | yes — filter BETWEEN, `meta_value_num` sort |
| hp_request | `hp_due_date` | 709 | — | no |
| hp_booking | `hp_start_time`, `hp_end_time` | 1 | `hp_booking_core` | no (1 booking) |
| `*_attribute` | `hp_edit_field_*`, `hp_filterable`, … | 3 each | — | attribute settings, read by ID |
User meta and comment meta: no `hp_*` rows. Term meta: `hp_sort_order` 170, `hp_icon`
153 (`hp_taxonomy`).
## Where the extensions keep their data
- **Reviews** — `hp_review` comments (5,324); rating in `comment_karma` (see
[REGISTERED-KEYS.md](REGISTERED-KEYS.md)).
- **Requests / offers** — `hp_request` posts; offers are `hp_offer` comments (48), no meta.
- **Messages** — `hp_message` comments (0 on dev36).
- **Favorites** — 4 user meta rows (no `hp_` prefix); nothing to flatten.
- **Bookings** — `hp_booking` posts (1); **memberships** — no plans on dev36.
- **Tags / categories / select attributes** — taxonomies (`hp_listing_tags` 2,160,
`hp_listing_category` 101,175, `hp_listing_warranty` 720 relationships). A select
filter (`warranty=28`) becomes `tax_query hp_listing_warranty IN`, never a meta query.
- **SEO, social links** — no rows on dev36.
## Query shapes seen (front-end crawl, 18 URLs)
- Search filters on number attributes: `hp_price` / `hp_hourly_rate` / `hp_budget`
`BETWEEN DECIMAL` — routed.
- Sort: the named shape `(NOT EXISTS OR EXISTS)` on `hp_price`, `hp_hourly_rate`,
`hp_rating` with `orderby=<name>__order` — routed, flat-first since core 1.2.0;
requests sort by `meta_key=hp_budget` + `meta_value_num` (a secondary query here) —
a shape the router handles.
- Featured block: `meta_key=hp_featured` + `orderby=rand`, and `hp_featured = CHAR`.
- Every front-end search carries WooCommerce's `product_visibility NOT IN` tax query.
- `HivePress\Components\Attribute::set_search_query` runs its own `get_posts()` inside
`pre_get_posts` (suppress_filters): not routable (~100 ms on dev36).
## D04 (auto-register HivePress attributes): not now
Every meta key HivePress queries on dev36 is already registered; select attributes are
taxonomies; the unregistered keys that are written (`hp_due_date`, `hp_availability`,
`hp_warranty`) are never queried. Auto-registration would only pay off on a site whose
admin adds **filterable or sortable number / date attributes** — revisit then (a doctor
check listing such attributes without a registered key would flag it).