Refactor from 1.x.
Motivation for Refactoring
The original 1.x was a version that I took over and appeared to have been an adaptation of the Search API Solr module. As a lot of quick fixes had been applied to add features and address issues, it was difficult to debug at times.
Additionally, during the alpha there was interest by another party in shipping the module with support for both the Elastica client and official Elasticsearch-PHP client. That resulted in adding a submodule for Elastica with the understanding that the other party would be adding a submodule for Elasticsearch-PHP. That never happened.
Elastica also appears to be moving in the direction of using Elasticsearch-PHP as it’s transport in the future. The reason for continuing to use the Elastica client is developer experience. Elasticsearch-PHP is essentially a map of the Elasticsearch REST API, while Elastica maps the Elasticsearch DSL to objects.