-
Notifications
You must be signed in to change notification settings - Fork 62
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
Support for indexing serialized arrays #347
Comments
What unexpected, undesirable edge cases could we encounter with this approach? Also, it'd be worthwhile to see how the other search plugins handle this (ElasticPress and others). |
The original content is no longer indexed in the "*_s" field, so if anyone used the content from the Solr results for display purposes and relied on the exact content of that field, that would no longer work. The original content is however still stored in the "*_str" field, so that use case would still be possible. |
Ok, I'm amenable to this change. |
@ataylorme I'm going to move this out of |
Many plugins store data (e. g. repeatable text boxes) as serialized arrays in the post_meta table. Example:
Indexing those fields can lead to unwanted search results as control characters and array keys are included. One way to solve this would be using the "solr_build_document" filter to replace the fields in the solr document before sending it to the server.
The solution I propose would make this easier by automatically "flattening" serialized arrays. The related pull request can be found under #346.
The text was updated successfully, but these errors were encountered: