SynonymFilter may have a keepOrig flag. If so, that would map countries to continents and not keep the country names.
<filter class="solr.SynonymFilterFactory" synonyms="continents.txt" keepOrig="false" /> wunder On Aug 8, 2013, at 4:10 AM, Christian Köhler - ZFMK wrote: > Hi, > > I have thought about synonyms as well. But wouldn't leave me this with a > field that contains both the original expression and additionally the > continent? e.g. "germany, continent-europe". I am not sure if this might > get in the way at some point. > > On the other hand this would enable my to have a single search field, > where the user could search by country or continent. Interesting - I'll > give it a thought. > > Thanx > Chris > > > Am 07.08.2013 17:56, schrieb Walter Underwood: >> Good point. Copying to a separate field that applied synonyms could help. >> >> Filtering out the original countries could be tricky. The Javadoc mentiones >> a keepOrig flag, but the Solr docs do not. If you could set keepOrig=false, >> that would do the trick. >> >> wunder >> >> On Aug 7, 2013, at 5:13 AM, Erick Erickson wrote: >> >>> Walter: >>> >>> Oooh, nice! One could even use a copyField if one wanted to >>> keep them separate... >>> >>> Erick >>> >>> >>> On Tue, Aug 6, 2013 at 12:38 PM, Walter Underwood >>> <wun...@wunderwood.org>wrote: >>> >>>> Would synonyms help? If you generate the query terms for the continents, >>>> you could do something like this: >>>> >>>> usa => continent-na >>>> canada => continent-na >>>> germany => continent-europe >>>> >>>> und so weiter. >>>> >>>> wunder >>>> >>>> On Aug 6, 2013, at 2:18 AM, Christian Köhler - ZFMK wrote: >>>> >>>>> 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 >>>> >>>> >>>> >>>> >>>> >>>> >> >> -- >> Walter Underwood >> wun...@wunderwood.org >> >> >> >> > > > -- > 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 -- Walter Underwood wun...@wunderwood.org