Using the search_api_solr_datasource sandbox module already works really well for searching through an arbitrary Solr index, not created with the config files (esp. schema) provided by this module.
However, it leads to a few notices being printed, which I think can be very easily avoided. With this patch, I don't see any notices anymore (at the moment).
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2881369-2--work_with_unexpected_schemas.patch | 1.4 KB | drunken monkey |
Comments
Comment #2
drunken monkeyPatch attached. As said, very simple changes, just a bit more defensive coding.
Comment #3
mkalkbrennerExploding any kind of version string coming from a different server might set $parts[1] and therefor mess up things.
I suggest to verify the schema string if it matches our pattern.
If not this function should return something like const FOREIGN_SCHEMA.
Comment #4
mkalkbrennerIt seems that it makes a lot of sense to clearly indicate that we discovered a foreign schema and to deal with it at various places.
Comment #5
mkalkbrennerthe code in question is now part of the connector.
Comment #6
mkalkbrennerThere's a checkbox in the server settings to turn off the schema check.