-
Notifications
You must be signed in to change notification settings - Fork 2
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
Limit user fields which are indexed by default #408
Comments
ElasticPress can be used for regular queries but in Altis it only kicks in when performing a search by default. Some projects might be using the |
I've updated the acceptance criteria with what I think will give us a good baseline and also start some docs top make these common errors more searchable. |
In projects using the Roles to Taxonomy plugin, the capabilities meta fields can probably be ignored by default. In other cases, I think we should be able to specify the index type of that field, so that we're only indexing it once instead of multiple times for each of the different indexable types. |
Would be good to know if that plugin plays nicely with capability queries actually 🤔 |
Hey team! Please add your planning poker estimate with ZenHub @robindevitt @shadyvb |
@roborourke we've estimate this one to 5 SP and moved it to the backlog |
@ivankristianto notes in the issue which spawned this suggestion, that the default fields ES does use for indexing are very limited: $prepared_search_fields = [
'user_login',
'user_nicename',
'display_name',
'user_url',
'user_email',
'meta.first_name',
'meta.last_name',
'meta.nickname',
]; He elaborates there,
This would be more concise overall than maintaining a long list of patterns to test against in order to omit data, and runs less risk of throwing away something that an Altis site does end up wanting to search on. One final thought: Fields get interpreted into many different types of mapping in ES. I wonder if it is necessary to have |
On a large multisite network, we are encountering many errors of this type when indexing users:
We have manually excluded some fields using the
ep_prepare_user_meta_data
hook, but are still running into this error. This ticket proposes further limiting the fields which get indexed by default, so that it is less likely that user indexing will fail on a large network.Specifically, I wonder whether these fields need to be indexed:
hm.workflows.*
metaboxhidden_*
meta-box-order_*
wp_##_capabilities
wp_##_user_level
wp_##_user_settings
wp_##_user-settings-time
wp_##_media_library_mode
wp_##_yoast_notifications
wp_##_dashboard_quick_press_last_post_id
wp_##_...
field@rmccue suggested the roles and capabilities fields may be needed for user queries, although we weren't sure off the top whether Elasticpress involves itself in the normal queries Core does. But these fields represent a significant percentage of the meta stored against a user, and as a layperson I struggle to imagine how I'd want to search for somebody based on these values.
Acceptance crtieria:
wp elasticpress get-mapping
to find thishm.workflows.*
The text was updated successfully, but these errors were encountered: