Don't know about "best practice", but to me, the obvious solution would be
to have a database table holding the relationships between countries and
continents, and using a join to get the continent.


On Mon, Aug 5, 2013 at 9:59 AM, Christian Köhler - ZFMK
<c.koeh...@zfmk.de>wrote:

> Hi,
>
> I am indexing data from a mysql data source. Each record contains the
> field "country". I am looking for a suitable way to create a field
> "continent" at indexing time. A list with the information country ->
> continent is given.
>
> Writing a script and calling it as a transformer in the sql query  would
> be my solution of choice right now. A RegexTransformer seems to be less
> elegant with 200+ different countries.
>
> Solr indexes 10 million records, so efficiency should be kept in mind.
>
> With my limited knowledge I might be missing the obvious solution. What
> would be the best practice? Any thoughts are welcome.
>
> Regards
> Chris
> --
> Zoologisches Forschungsmuseum Alexander Koenig
> - Leibniz-Institut für Biodiversität der Tiere -
> Adenauerallee 160, 53113 Bonn, Germany
> www.zfmk.de
>
> Stiftung des öffentlichen Rechts; Direktor: Prof. J. Wolfgang Wägele
> Sitz: Bonn
>

Reply via email to