-
Notifications
You must be signed in to change notification settings - Fork 311
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
"Fielddata is disabled on text fields by default." Admin Feature #643
Comments
Hi @bcumber Thanks for bringing this to our notice. Which version of ElasticPress you are using? We have pushed an update(v2.1.2) 2 weeks before for Elasticsearch 5.x related issues. Regards, |
I'm using ElasticPress v2.1.2, Wordpress v4.6.1, and Elasticsearch v5.0.1. |
Hi @bcumber We are looking into this and will let you know once we have fix for it. Regards, |
@tlovett1 I am able reproduce this one locally and I think we need to update mapping. What do you suggests? Regards, |
@Ritesh-patel Out of curiosity, are you able to reproduce both the first |
@bcumber I can only see the first one. If I set |
@Ritesh-patel I'm not surprised the error is only on my end; my WordPress installation is very large. However, elasticsearch does warn that updating fielddata to be true for those text fields increases memory usage dramatically. Would it be possible to implement their preferred approach instead? https://www.elastic.co/guide/en/elasticsearch/reference/current/fielddata.html#before-enabling-fielddata |
I tested changing the mapping of the Also, the mapping needs to be changed for each instance of the |
Hi @bcumber Yes, submitting a PR will be great, we can discuss further in PR. |
…osts_pre_query for WP_Query integration which fixes pages in admin dashboard 10up#643
Okay, we thought a lot about this one. Elasticsearch gives us absolutely no work around the current 5.1.x version of Elasticsearch. We could create entirely new sortable fields for a number of different post fields but that would be tedious and require a lot of architectural changes. There's good news! Analyzers are supported by the keyword field in master now. We will wait for this to be released as a major ES version then support that in a mapping. For now everyone has two options:
|
@tlovett1 We've run into this issue with a client running ES 5.2.x. It may be worth revisiting as more and more users are upgrading from 2.4. |
@allan23 can you do some research on a solution? |
I noticed that in the Elasticsearch Python DSL you can sort Text Fields, but just have to append ".keyword" to the name of the field. https://www.elastic.co/guide/en/elasticsearch/guide/current/multi-fields.html was helpful |
@tlovett1 after reviewing the issue that the client experienced, I found that it was due to custom user indexing and failure to update their mapping upon ES upgrade. Closing this out. |
I get the following exception from Elasticpress when I load the "Pages" in the admin screen:
If I understand this error correctly (and I'm new to Elasticsearch, Wordpress, and ElasticPress so I could very well be misunderstanding) version 5.x of Elasticsearch does not index text fields for sorting by default. (This does seem to differ from previous versions 5.x vs 2.4)
The 5.x documentation provides a way to enable fielddata for text fields. I tried to do this:
With this setting active, I don't see any errors on the elasticsearch side of things, but Wordpress errors out with a
PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/wp-includes/kses.php on line 1430
. I would assume this is a separate error, on my side of things, but its worth mentioning. Either way, I can't seem to get the admin feature to work.So my first question is: how can I get the admin feature to work by changing elasticsearch/wordpress settings? And my second question is: Is this how ElasticPress should be doing things?
The text was updated successfully, but these errors were encountered: