Gather database connection details from ActiveRecord.

If the connection is changed within an index definition (say, between defining multiple sources), the model's connection doesn't reflect that change.