- Issue created by @guignonv
- Status changed to Fixed
almost 2 years ago 1:42pm 23 January 2023 - 🇫🇷France guignonv
@janes_p, this is not a bug, it's something that has not been configured. When you edit your external entity type, you sometimes need to specify the filter mapping as well. It's not needed when you just use your external entities with Drupal default features but since you are using the external entity in Search API, you need to do that. It's a setting to expend on the "storage" tab of your external entity, just below the "LIST" query.
You should map it to "provider_id" in your case (sa shown on the picture).But since, once again, it is not obvious, I'll commit a patch that will provide a default mapping so you won't have to enter twice the same mapping, and I will rename "Filter mappings" to "Filter mapping overrides"... and it will work by default in your case.
- 🇨🇭Switzerland janes_p Zurich
Thanks, @guignonv - this is indeed not obvious and almost impossible to figure out without assistance. That's why documentation and/or generating reasonable defaults for simple cases is so important for a wider usage of this otherwise very useful module!
It appears there is sill a quirk in the code - after having configured the filter fields as per your hint (and cleared numerous caches) I am still getting the same error message when I am calling
Search API
for indexing:Query failed: SQLSTATE[42703]: Undefined column: 7 ERROR: column "id" does not exist LINE 1: ...e FROM "plan_e"."provider" p WHERE TRUE ORDER BY id ASC LIM... ^: SELECT p.provider_id, p.provider_name FROM "plan_e"."provider" p WHERE TRUE ORDER BY id ASC LIMIT 100; Array ( )
- 🇫🇷France guignonv
Could you try with the "dev" version? Maybe a code update is needed. Once you've got the dev version, try clearing the settings of "Filter mapping overrides" (just use default behavior introduced in the last dev version).
- Status changed to Needs review
almost 2 years ago 9:18am 24 January 2023 - 🇨🇭Switzerland janes_p Zurich
Thanks, @uignov - no more error with indexing based on the
dev
version (and filter left on default, e.g. empty) 😊.The indexing process reports 1030 indexed entries for my
provider
table. I have yet to figure out how to retrieve and validate the indexed entries. I will keep you posted. - Status changed to Fixed
almost 2 years ago 1:57pm 26 January 2023 Automatically closed - issue fixed for 2 weeks with no activity.