- 🇳🇿New Zealand ericgsmith
I'm having a different issue but it feels very related to this as the issue stems from the behaviour for empty fields.
In my case the field is a property added by a processor - I'm not sure if that fits in the definition here of a field.
In my case, I have "Retrieve result data from Solr" set to true and I am using the search api attachments module to index document contents. I am using that field in views.
When the field is empty I can see the same outcome as the issue summary when the field is pre rendered -
!isset($row->$dependent))
is TRUE so the field becomes required. Rather than loading the entity, this now diverges from the issue summary and loads the processor as callsaddFieldValues
.I have tried using the "Index empty full fields" option but when it comes to indexing it gets to the loop where values are added - but at this point
$values
is an empty array so nothing is added to the index.Applying this patch seems to resolve the issue - the empty field is added to the result set and then when the check is done in the getValuesToExtract the value set is an empty array and no action is taken.
I will do a more thorough test & review in the next few days.
- 🇳🇿New Zealand ericgsmith
ericgsmith → changed the visibility of the branch 3179643-empty-field-entity-load to hidden.
- 🇳🇿New Zealand ericgsmith
ericgsmith → changed the visibility of the branch 8.x-1.x to hidden.
- 🇳🇿New Zealand ericgsmith
ericgsmith → changed the visibility of the branch 3179643-empty-field-leads to hidden.
- Merge request !56#3179643: Empty field leads to full entity load, empty processor value leads to full processor load → (Open) created by ericgsmith
- 🇳🇿New Zealand ericgsmith
Added a check to cover the remaining check that the field was requested mentioned in #9
I haven't moved this to Github yet - I think getting buy in for the approach first since this has been open for a while.
While I think conceptually "Index empty fields" is probably a more logical thing to opt in to, this looked to have a few moving parts I didn't understanding while debugging.