-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Not indexing everything #2651
Comments
Hi @blenkhn, First, you'll need to determine if those fields are indexed or not for those specific documents. The easier way to discover that is using the debugging plugins. Make a search where those posts/users/orders are returned and check the "Query Results" tab -- it will contain the document as indexed by Elasticsearch. If you want, you can share that with us pasting it in a pastebin and sending the link to it here. If the fields are correctly indexed, it is probably something related to the search algorithm being used. To debug that we'll need some concrete examples of what matches and not and also the contents of the "Query Body" tab. |
This issue has been automatically closed because there has been no response to our request for more information. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. See this blog post on bug reports and the importance of repro steps for more information about the kind of information that may be helpful. |
So I have installed the plugins you have specified. and have seen some results. What exactly do you need from me? |
curl -XPOST -H 'Content-Type: application/json' -d '{"from":0,"size":40,"sort":[{"_score":{"order":"desc"}}],"query":{"function_score":{"query":{"bool":{"should":[{"multi_match":{"query":"549105","type":"phrase","fields":["post_title","post_content","post_excerpt","meta._order_key.value","meta._billing_company.value","meta._billing_address_1.value","meta._billing_address_2.value","meta._billing_city.value","meta._billing_postcode.value","meta._billing_country.value","meta._billing_state.value","meta._billing_email.value","meta._billing_phone.value","meta._shipping_address_1.value","meta._shipping_address_2.value","meta._shipping_city.value","meta._shipping_postcode.value","meta._shipping_country.value","meta._shipping_state.value","meta._billing_last_name.value","meta._billing_first_name.value","meta._shipping_first_name.value","meta._shipping_last_name.value","meta._items.value"],"boost":3}},{"multi_match":{"query":"549105","fields":["post_title","post_content","post_excerpt","meta._order_key.value","meta._billing_company.value","meta._billing_address_1.value","meta._billing_address_2.value","meta._billing_city.value","meta._billing_postcode.value","meta._billing_country.value","meta._billing_state.value","meta._billing_email.value","meta._billing_phone.value","meta._shipping_address_1.value","meta._shipping_address_2.value","meta._shipping_city.value","meta._shipping_postcode.value","meta._shipping_country.value","meta._shipping_state.value","meta._billing_last_name.value","meta._billing_first_name.value","meta._shipping_first_name.value","meta._shipping_last_name.value","meta._items.value"],"boost":1,"fuzziness":"auto","operator":"and"}},{"multi_match":{"query":"549105","type":"cross_fields","fields":["post_title","post_content","post_excerpt","meta._order_key.value","meta._billing_company.value","meta._billing_address_1.value","meta._billing_address_2.value","meta._billing_city.value","meta._billing_postcode.value","meta._billing_country.value","meta._billing_state.value","meta._billing_email.value","meta._billing_phone.value","meta._shipping_address_1.value","meta._shipping_address_2.value","meta._shipping_city.value","meta._shipping_postcode.value","meta._shipping_country.value","meta._shipping_state.value","meta._billing_last_name.value","meta._billing_first_name.value","meta._shipping_first_name.value","meta._shipping_last_name.value","meta._items.value"],"boost":1,"analyzer":"standard","tie_breaker":0.5,"operator":"and"}}]}},"functions":[{"exp":{"post_date_gmt":{"scale":"14d","decay":0.25,"offset":"7d"}}},{"weight":0.001000000000000000020816681711721685132943093776702880859375}],"score_mode":"sum","boost_mode":"multiply"}},"post_filter":{"bool":{"must":[{"terms":{"post_type.raw":["shop_order"]}},{"terms":{"post_status":["wc-pending","wc-processing","wc-on-hold","wc-completed","wc-cancelled","wc-refunded","wc-failed"]}}]}}}' |
is the search supposed to index woocommerce orders? I have several hundred "users" errors in the logs when I delete and reindex. |
this is one of the 442 errors that I got. 882 (User): [mapper_parsing_exception] failed to parse field [user_registered] of type [date] in document with id '882' |
Hi @blenkhn, If you have WooCommerce AND Protected Content enabled, yes, your orders should be indexed (and you also should upgrade to ElasticPress 4.0.1 if you didn't do it yet.) The error you are seeing there is unrelated though, that is for Users, a different feature. You sent the cURL request and although that is useful, what I meant is the content of this section: To help you with your problem, we'll need the answer to the following questions:
Thanks |
I have upgraded to 4.0.1 already. For the woocommerce functionality I do have Active Custom Fields working and the indexing seems to work just fine. I recall modifying the User fields So I will work at removing the custom fields from that which may remove the errors. I have no custom code related to elastic press except for what I mention above. The past bin doesn't return anything yet the key word I use is a order number. Here is the pastebin link https://pastebin.com/c6wN6xkH I am not sure if this works please let me know if it does. I posted the code you asked for below. |
{ |
Hi @blenkhn, To fix the specific bug where searching for an Order ID doesn't return proper results, we've opened #2666. Its code is available for download here: elasticpress.zip Do you mind updating your version of the plugin to this one and checking if that fixes the problem? Another thing that you might want to try is to disable the "Weight results by date" under "Post Search" in the Features screen. Can you test that and let us know? Thanks |
@blenkhn bringing the communication back to your issue, here are the answers:
|
You are correct, advanced custom fields it is. Sorry about that. |
How can I send you the log file. This time the log file seemed to get stuck in a loop. Line 700 - 34081 was all the same. with this message: 34081 Users did not get synced. and no errors were generated. |
The order numbers now work wonderfully thanks very much for this. There are 412 errors of this nature. 1093 (User): [mapper_parsing_exception] failed to parse field [user_registered] of type [date] in document with id '1093' Also when searching for a customer via their email address, it seems to take apart the email address and search for all the pieces of the email address. for example searching for my email address returns a lot of results that I am sure are not intended. Query Body: https://pastebin.com/gB90WfbX Top of the results. Please let me know if you need more. There was some stuff in it that was interesting including what looked like to being log files. { } |
Hi @blenkhn, It seems we have 3 different topics going on here, is that right?
Thanks! |
This issue has been automatically closed because there has been no response to our request for more information. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. See this blog post on bug reports and the importance of repro steps for more information about the kind of information that may be helpful. |
Hi the user email does not seem to match the email precisely. Is there a way to do this? where do I run that other command you mentioned? |
Yes I removed the changes and I still get the errors. |
Hi @blenkhn, That is a WP-CLI command. WP-CLI is a command-line interface for WordPress, so you can interact with your site via a terminal. You can read more about it here: https://wp-cli.org/ Regarding how the emails are matched, you can try to disable fuzziness by adding |
This issue has been automatically closed because there has been no response to our request for more information. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. See this blog post on bug reports and the importance of repro steps for more information about the kind of information that may be helpful. |
I will be looking at this this afternoon / evening. Please be patient |
I have found that I get something very similar to the challenge with users as products now. the Fuzziness has expanded and I now get a ton of results when I do a search for the SKU. |
I have installed the wp-cli for the terminal and I get the following errors: I can figure out the previous one, but a little guidance would be nice. I am not comfortable running the command as root though. |
I added this command "add_filter( 'ep_user_fuzziness_arg', '__return_zero' );" to the functions of the child theme and it didn't seem to do anything at all. |
In the plugin there is a section called facets. is this the one that pulls the search term apart? |
I still get these errors. 1105 |
Hi @blenkhn, Here are some answers and clarifications.
At this point, it seems all the problems you are facing are related to your codebase, and that falls outside of the scope of this repository. If you’re interested in further assistance, we would be happy to help you. You can visit https://www.elasticpress.io/elasticpress-consulting/ to schedule an appointment for a consultation. |
Describe the bug
The search in the backend whether it is orders, products, or users seems to index some of the information yet leaves holes. Sometimes the SKU is returned and sometimes it is not, yet the product is found by name. sometimes the user's email address is returned and sometimes it is not yet found by name. Same thing occurs with orders.
The site is quite large and the number of items indexed is reported at 488,000
Steps to Reproduce
Perform a search in the backend using the native fields.
Expected behavior
I expect the SKU search to return the products, order number to return the order and the email to return the proper user.
Screenshots
Environment information
Site Health Info:
`
wp-core
version: 5.9.2
site_language: en_US
user_language: en_US
timezone: America/Vancouver
permalink: /blog/%year%/%monthnum%/%day%/%postname%/
https_status: true
multisite: true
user_registration: false
blog_public: 1
default_comment_status: open
environment_type: production
user_count: 1016
site_count: 2
network_count: 1
dotorg_communication: true
wp-dropins (1)
maintenance.php: true
wp-active-theme
name: Hello Elementor Child (hello-theme-child-master)
version: 1.0.1
author: Elementor Team
author_website: https://elementor.com/
parent_theme: Hello Elementor (hello-elementor)
theme_features: core-block-patterns, widgets-block-editor, post-thumbnails, menus, automatic-feed-links, title-tag, html5, custom-logo, editor-style, align-wide, woocommerce, wc-product-gallery-zoom, wc-product-gallery-lightbox, wc-product-gallery-slider
theme_path: /home/keyinnov/public_html/wp-content/themes/hello-theme-child-master
auto_update: Disabled
wp-parent-theme
name: Hello Elementor (hello-elementor)
version: 2.5.0
author: Elementor Team
author_website: https://elementor.com/?utm_source=wp-themes&utm_campaign=author-uri&utm_medium=wp-dash
theme_path: /home/keyinnov/public_html/wp-content/themes/hello-elementor
auto_update: Disabled
wp-themes-inactive (2)
Twenty Twenty-One: version: 1.5, author: the WordPress team, Auto-updates disabled
Twenty Twenty-Two: version: 1.1, author: the WordPress team, Auto-updates disabled
wp-plugins-active (48)
Adding Flat rate shipping in Woocommerce Role manager: version: 1.0, author: PI Websolution, Auto-updates disabled
Advanced Custom Fields PRO: version: 5.12, author: Delicious Brains, Auto-updates disabled
Advanced Database Cleaner PRO: version: 3.1.7, author: Younes JFR., Auto-updates disabled
Advanced Free - Flat shipping WooCommerce - Pro: version: 1.2.7.17, author: PI Websolution, Auto-updates disabled
Advanced Order Export For WooCommerce: version: 3.2.2, author: AlgolPlus, Auto-updates disabled
All 404 Pages Redirect to Homepage: version: 1.4, author: Geek Code Lab (latest version: 1.6), Auto-updates disabled
AnyWhere Elementor Pro (Premium): version: 2.22.2, author: WP Vibes (latest version: 2.23), Auto-updates disabled
Bulk Delete: version: 6.0.2, author: Sudar, Auto-updates disabled
Download Plugins and Themes from Dashboard: version: 1.8.1, author: WPFactory, Auto-updates disabled
Easy WP SMTP: version: 1.4.7, author: wpecommerce, alexanderfoxc, Auto-updates disabled
ElasticPress: version: 4.0.0, author: 10up, Auto-updates disabled
Elementor: version: 3.5.6, author: Elementor.com, Auto-updates disabled
Elementor Contact Form DB: version: 1.7, author: Sean Barton - Tortoise IT, Auto-updates disabled
Elementor Pro: version: 3.6.3, author: Elementor.com, Auto-updates disabled
Essential Addons for Elementor: version: 5.0.10, author: WPDeveloper, Auto-updates disabled
Essential Addons for Elementor - Pro: version: 5.0.8, author: WPDeveloper, Auto-updates disabled
GA Google Analytics: version: 20220124, author: Jeff Starr, Auto-updates disabled
GazChap's WooCommerce Purchase Order Payment Gateway: version: 1.1.5, author: Gareth 'GazChap' Griffiths, Auto-updates disabled
GDPR Cookie Consent: version: 2.1.1, author: WebToffee, Auto-updates disabled
IWSPro: version: 1.0.0, author: IWSPro, Auto-updates disabled
IWSPRO Product Import: version: 1.0.0, author: IWSPro, Auto-updates disabled
JSM's Show Post Metadata: version: 3.0.2, author: JS Morisset, Auto-updates disabled
Order Delivery Date for WooCommerce (Lite version): version: 3.16.1, author: Tyche Softwares, Auto-updates disabled
PHP Compatibility Checker: version: 1.5.2, author: WP Engine, Auto-updates disabled
PowerPack Pro for Elementor: version: 2.7.10, author: Team IdeaBox - PowerPack Elements, Auto-updates disabled
Really Simple SSL: version: 5.3.0, author: Really Simple Plugins, Auto-updates disabled
reCAPTCHA for WooCommerce: version: 1.1.2, author: WPElitePlugins, Auto-updates disabled
Smash Balloon Instagram Feed: version: 6.0.4, author: Smash Balloon, Auto-updates disabled
Snazzy Maps: version: 1.4.0, author: Snazzy Maps, Auto-updates disabled
StoreCustomizer Pro: version: 2.3.7, author: Kaira (latest version: 2.3.8), Auto-updates disabled
TC Custom JavaScript: version: 1.2.3, author: Tiny Code, Auto-updates disabled
Ultimate Member: version: 2.3.1, author: Ultimate Member, Auto-updates disabled
WooCommerce: version: 6.2.2, author: Automattic (latest version: 6.3.1), Auto-updates disabled
WooCommerce Bambora Gateway: version: 2.6.0, author: SkyVerge (latest version: 2.6.1), Auto-updates disabled
WooCommerce Category Accordion: version: 2.0, author: TechieResource, Auto-updates disabled
WooCommerce Coupon Generator: version: 1.2.0, author: Jeroen Sormani, Auto-updates disabled
WooCommerce Infinite Scroll and Ajax Pagination: version: 1.1, author: SB Themes, Auto-updates disabled
WooCommerce PDF Invoices & Packing Slips: version: 2.14.0, author: WP Overnight, Auto-updates disabled
WooCommerce Role Based Methods: version: 2.4.3, author: WPBackOffice, Auto-updates disabled
WooCommerce Shipping & Tax: version: 1.25.23, author: WooCommerce, Auto-updates disabled
WooCommerce Sync for QuickBooks Online - by MyWorks Software: version: 2.4.0, author: MyWorks Software (latest version: 2.5.0), Auto-updates disabled
WooCommerce Sync for QuickBooks Online - Custom Field Mapping: version: 1.3.0, author: MyWorks Software, Auto-updates disabled
WP-REST-Allow-All-CORS: version: 1.0.0, author: mrahmadawais, WPTie, Auto-updates disabled
WP Crontrol: version: 1.12.0, author: John Blackbourn & crontributors, Auto-updates disabled
WPElite Plugins Updater: version: 1.0.2, author: WPElitePlugins, Auto-updates disabled
WP Google Maps: version: 8.1.21, author: WP Google Maps, Auto-updates disabled
Yoast Duplicate Post: version: 4.4, author: Enrico Battocchi & Team Yoast, Auto-updates disabled
Yoast SEO: version: 18.3, author: Team Yoast, Auto-updates disabled
wp-media
image_editor: WP_Image_Editor_GD
imagick_module_version: Not available
imagemagick_version: Not available
imagick_version: Not available
file_uploads: File uploads is turned off
post_max_size: 300M
upload_max_filesize: 300M
max_effective_size: 300 MB
max_file_uploads: 20
gd_version: bundled (2.1.0 compatible)
gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
ghostscript_version: unknown
wp-server
server_architecture: Linux 4.18.0-348.12.2.el8_5.x86_64 x86_64
httpd_software: Apache
php_version: 7.4.28 64bit
php_sapi: fpm-fcgi
max_input_variables: 10000
time_limit: 1000
memory_limit: 12288M
max_input_time: 1000
upload_max_filesize: 300M
php_post_max_size: 300M
curl_version: 7.61.1 OpenSSL/1.1.1k
suhosin: false
imagick_availability: false
pretty_permalinks: true
htaccess_extra_rules: true
wp-database
extension: mysqli
server_version: 10.3.34-MariaDB
client_version: mysqlnd 7.4.28
max_allowed_packet: 268435456
max_connections: 151
wp-constants
WP_HOME: undefined
WP_SITEURL: undefined
WP_CONTENT_DIR: /home/keyinnov/public_html/wp-content
WP_PLUGIN_DIR: /home/keyinnov/public_html/wp-content/plugins
WP_MEMORY_LIMIT: 2048M
WP_MAX_MEMORY_LIMIT: 12288M
WP_DEBUG: true
WP_DEBUG_DISPLAY: false
WP_DEBUG_LOG: true
SCRIPT_DEBUG: false
WP_CACHE: false
CONCATENATE_SCRIPTS: false
COMPRESS_SCRIPTS: undefined
COMPRESS_CSS: undefined
WP_ENVIRONMENT_TYPE: Undefined
DB_CHARSET: utf8
DB_COLLATE: undefined
wp-filesystem
wordpress: not writable
wp-content: not writable
uploads: writable
plugins: not writable
themes: not writable
Additional context
The text was updated successfully, but these errors were encountered: