Hi,

One interesting issue: These countries that span continents - Turkey and
Russia and some of the former USSR Republics.

I arbitrarily assigned them a single continent:

// Note: Turkey is mapped to Asia, and Russia to Europe,
//       Azerbaijan to Asia, Armenia to Asia, Cyprus to Asia,
//       Georgia to Asia, Kazakhstan to Asia,

I came across the same problem. Not to mention the oversee territories
of France, the Netherlands, ...

(I hope I don't get too much hate mail from the Greeks for considering
Cyprus to be part of Asia, but it is closer.)

I'd rather assign them to both continents. A false positive is (in my
case) better than a miss. My data provides a geo coordinate for each
record which I could use for a clarification when in doubt - but this
might be an other topic.


I suppose continent could be multivalued or maybe a composite string
("eu/as" or "eu+as"), but that has an impact on queries.

But, the scripts also handles multivalued fields (one value at a time),
and nested multivalued fields is not supported.

Thoughts?

-- Jack Krupansky

-----Original Message----- From: Christian Köhler - ZFMK
Sent: Tuesday, August 06, 2013 5:18 AM
To: solr-user@lucene.apache.org
Subject: Re: Transform data at index time: country -> continent

Am 05.08.2013 15:52, schrieb Jack Krupansky:
You can write a brute force JavaScript script using the StatelessScript
update processor that hard-codes the mapping.

I'll probably do something like this. Unfortunately I have no influence
on the original db itself, so I have fix this in solr.

Cheers
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


--
Christian Köhler
Tel.: 0228 9122-433

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
--
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