10up / ElasticPress

A fast and flexible search and query engine for WordPress.
https://elasticpress.io
GNU General Public License v2.0
1.25k stars 313 forks source link

BUG: min_price & max_price query strings not working with EP #4007

Open majiix opened 2 weeks ago

majiix commented 2 weeks ago

Describe the bug

Woocommerce uses min_price & max_price query strings for filtering products based on price. But they are not working with EP activated.

Steps to Reproduce

1- Go to category page 2- or use a url like this with a category https://123.com/product-category/some-cat/?min_price=100&max_price=200 3- Now it should filter with price but not working.

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress and ElasticPress information

## Failed Queries ##

## WordPress ##

### WordPress Environment ###
wp_version: 6.6.2
home_url: https://***
site_url: https://***
is_multisite: false
theme: Impreza (8.30)
plugins: Block eCommerce Assets via robots.txt (1.2.0)، Code Snippets (3.6.5.1)، Disable Emails (1.8.2)، Easy SVG Support (3.7)، ElasticPress (5.1.3)، File Renaming on upload (2.6.0)، Google Analytics for WooCommerce (2.1.7)، Index WP MySQL For Speed (1.5.2)، NinjaFirewall (WP Edition) (4.6.1)، Object Cache Pro (1.21.2)، Perfmatters (2.3.4)، Performant Translations (1.2.0)، Product Filters for WooCommerce (1.4.33)، The SEO Framework (5.0.6)، The SEO Framework - Extension Manager (2.6.3)، UpSolution Core (8.30)، WooCommerce (9.3.3)، WP Offload Media (3.2.8)، WP Offload Media Tweaks (0.5.0)، و WP Super Cache (1.12.4)
revisions: 1

### Server Environment ###
php_version: 8.3.12
memory_limit: 1024M
timeout: 1200

## Indexable Content ##

### ***###
post_count: 0
page_count: 9
product_count: 254,530
us_portfolio_count: 47
us_header_count: 1
us_content_template_count: 5
us_page_block_count: 2
us_grid_layout_count: 4
post_meta_keys: 0
page_meta_keys: 1
product_meta_keys: 19
us_portfolio_meta_keys: 0
us_header_meta_keys: 0
us_content_template_meta_keys: 0
us_page_block_meta_keys: 0
us_grid_layout_meta_keys: 0
total-all-post-types: 20
distinct-meta-keys: ep_exclude_from_search، _backorders، _downloadable، _manage_stock، _price، _product_version، _sku، _sold_individually، _stock، _stock_status، _tax_class، _tax_status، _virtual، _wc_average_rating، total_sales، _thumbnail_id، _regular_price، _sale_price، _product_attributes، و _upsell_ids

## ElasticPress ##

### Settings ###
host: http://***/
index_prefix: 
language: site-default
per_page: 1000
network_active: false

### Timeouts ###
request_timeout: 5
index_document_timeout: 15
bulk_request_timeout: 30

## Elasticsearch Indices ##

### ***-post-1 ###
health: yellow
status: open
index: ***-post-1
uuid: ***
pri: 5
rep: 1
docs.count: 254563
docs.deleted: 44728
store.size: 2.5gb
pri.store.size: 2.5gb
dataset.size: 2.5gb
total_fields_limit: 5000
analyzer_language: persian
stop_language: _persian_
snowball_language: English

## Last Sync ##

### 2024/10/05 1:57:36 ب.ظ ###
method: WP Dashboard
is_full_sync: Yes
end_date_time: 2024/10/05 3:00:48 ب.ظ
total_time: 1 ساعت, 3 دقیقه, 13 ثانیه
total: 0
synced: 0
skipped: 0
failed: 0
errors: array (
)
trigger: manual
final_status: aborted

## Feature Settings ##

### Filters ###
active: true
force_inactive: false
match_type: any

### Post Search ###
active: true
decaying_enabled: 0
force_inactive: false
highlight_enabled: 0
highlight_excerpt: 0
highlight_tag: mark
synonyms_editor_mode: simple
synonyms: <pre># Defined synonyms.

runner, running shoe, sneaker, tennis shoe, trainer
بلندگو, بلندگوی, بلندگوی خودرو

# Defined hyponyms.

blue => blue, aqua, azure, cerulean, cyan, ultramarine

# Defined replacements.

supposably => supposedly
flustrated => flustered, frustrated
intensive purposes => intents and purposes</pre>
weighting: array (
  'post' => 
  array (
    'post_title' => 
    array (
      'weight' => 1,
      'enabled' => false,
    ),
    'post_content' => 
    array (
      'weight' => 1,
      'enabled' => false,
    ),
    'post_excerpt' => 
    array (
      'weight' => 1,
      'enabled' => false,
    ),
    'author_name' => 
    array (
      'weight' => 1,
      'enabled' => false,
    ),
    'terms.post_tag.name' => 
    array (
      'weight' => 1,
      'enabled' => false,
    ),
    'terms.category.name' => 
    array (
      'weight' => 1,
      'enabled' => false,
    ),
    'terms.ep_custom_result.name' => 
    array (
      'enabled' => true,
      'weight' => 9999,
      'fuzziness' => false,
    ),
  ),
  'page' => 
  array (
    'post_title' => 
    array (
      'weight' => 1,
      'enabled' => false,
    ),
    'post_content' => 
    array (
      'weight' => 1,
      'enabled' => false,
    ),
    'post_excerpt' => 
    array (
      'weight' => 1,
      'enabled' => false,
    ),
    'author_name' => 
    array (
      'weight' => 1,
      'enabled' => false,
    ),
    'terms.ep_custom_result.name' => 
    array (
      'enabled' => true,
      'weight' => 9999,
      'fuzziness' => false,
    ),
  ),
  'product' => 
  array (
    'post_title' => 
    array (
      'enabled' => true,
      'weight' => 99,
    ),
    'post_content' => 
    array (
      'weight' => 1,
      'enabled' => false,
    ),
    'post_excerpt' => 
    array (
      'weight' => 1,
      'enabled' => false,
    ),
    'meta._sku.value' => 
    array (
      'weight' => 1,
      'enabled' => false,
    ),
    'meta._variations_skus.value' => 
    array (
      'weight' => 1,
      'enabled' => false,
    ),
    'terms.ep_custom_result.name' => 
    array (
      'enabled' => true,
      'weight' => 9999,
      'fuzziness' => false,
    ),
    'terms.product_tag.name' => 
    array (
      'weight' => 0,
      'enabled' => false,
    ),
  ),
)

### WooCommerce ###
active: true
force_inactive: false
orders: 0

Code of Conduct

felipeelia commented 4 days ago

@majiix I tried this one as well, and I can't reproduce the problem, it works fine for me. Can you please share on this issue the same data I asked in #3992? Thanks.

github-actions[bot] commented 16 hours ago

It has been 3 days since more information was requested from you in this issue and we have not heard back. This issue is now marked as stale and will be closed in 3 days, but if you have more information to add then please comment and the issue will stay open.