The second part of encapsulating ElasticSearch code. Introduces an abstract result class, where the ES subpackage implements the necessary accessors to its internal SearchHit class.
With the abstract result, the deduplication and conversion into the GeocodeJSON result can be moved into the generic handler part. The assumption here is that all database backends will use the same data schema. The abstract results just hids how the data is retrieved.
The second part of encapsulating ElasticSearch code. Introduces an abstract result class, where the ES subpackage implements the necessary accessors to its internal SearchHit class.
With the abstract result, the deduplication and conversion into the GeocodeJSON result can be moved into the generic handler part. The assumption here is that all database backends will use the same data schema. The abstract results just hids how the data is retrieved.