Skip to content
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: Unrecognised errors in failed queries #3164

Closed
JakePT opened this issue Nov 29, 2022 · 0 comments · Fixed by #3165
Closed

BUG: Unrecognised errors in failed queries #3164

JakePT opened this issue Nov 29, 2022 · 0 comments · Fixed by #3165
Assignees
Labels
bug Something isn't working

Comments

@JakePT
Copy link
Contributor

JakePT commented Nov 29, 2022

Describe the bug
When testing 4.4.0 I encountered 2 failed queries where the errors were not recognised and no solution could be recommended.

The first one occurred after deleting the posts index, updating an existing post, visiting the homepage, then searching for that post.

field [post_date_gmt] is of type [org.elasticsearch.index.mapper.TextFieldMapper$TextFieldType@72e0f4e4], but only numeric types are supported.

This appeared as a failed query on the homepage and the search results page. The homepage failed query seemed to be related to the Autosuggest template, as the failed query included the Autosuggest placeholder.

The other error was only logged against the homepage URL, and read:

Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [post_date] in order to load field data by uninverting the inverted index. Note that this can use significant memory.

This appeared to be for the main query for the homepage displaying the latest posts.

Additionally, in the fallback error message, GitHub is capitalised incorrectly:

We did not recognize this error. Please consider opening a Github Issue so we can add it to our list of supported errors.

Steps to Reproduce

  1. Run wp elasticpress delete-index
  2. Go to Posts > All Posts, select a post.
  3. Make a change to the post and click Update.
  4. Visit the latest posts page, with a search block/widget on it. Search for the edited post.
  5. Visit ElasticPress > Status Report in the admin.

Expected behavior
The failed queries should have a recommended solution that tells the user to complete a full sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants