Using search_api_db with a custom entity.
Changed Index-field-type for a textfield from Fulltext to String.
This creates a new table 'search_api_db_[index-name]_entity_[entity-type]_[field-name]' with two columns, 'item_id' and something like 'entity_[entity-type]_[field-name]'.
The indexing itself however will try to use a column "value", which does not exist.

On a first glimpse Database.php => line 1114

Comments

ChristianAdamski created an issue. See original summary.

christianadamski’s picture

Issue summary: View changes
christianadamski’s picture

Using $fields[$name]['column'] at line 1117 does not work either, because the 'language' table actually uses "value". Darn

christianadamski’s picture

StatusFileSize
new1.94 KB

This is what made indexing work again here.

christianadamski’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 4: 2616268-4-column-name-mixup.patch, failed testing.

drunken monkey’s picture

Priority: Normal » Major
Status: Needs work » Needs review
StatusFileSize
new2.12 KB
new1.43 KB

I think the actual solution is much more simple: the problem is just that, since the field only changes and isn't new, the old values the server has saved for the field are "bleeding" through. And while the code assumes that only the 'table' key exists in that info array when being handed to createFieldTable(), it actually has 'column' still set from before, resulting in an unexpected column name.

Status: Needs review » Needs work

The last submitted patch, 7: 2616268-7--switch_field_type_db_backend--tests_only.patch, failed testing.

drunken monkey’s picture

Status: Needs work » Needs review
borisson_’s picture

Status: Needs review » Reviewed & tested by the community

The regression test is very clear, so because that passes, I'm pretty confident that the bug will gone with this patch committed.

  • drunken monkey committed 178ede7 on 8.x-1.x
    Issue #2616268 by drunken monkey, ChristianAdamski: Fixed indexing fails...
drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Great to hear, thanks for reviewing!
Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.