You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Chris Hostetter <ho...@fucit.org> on 2010/03/04 20:03:41 UTC

Re: dynamic synonyms

: Wondering if this is possible. I have multiple clients using solr. Each
: client could have their own synonym list. During an update process if the
: record being inserted belongs to a client that happens to have it's own
: synonym file is there a way to use that during indexing / querying? It
: doesn't seem reasonable to have one  field type per client  so I'd like to
: know if there is a way to switch synonym files dynamically. It might not be
: possible since synonyms.txt is loaded when solr starts.

This would be pretty hard to do as a TokenFilter (because it has no way of 
knowing about the client) but you could implement it as an UpdateProcessor

Think hard about wether this really makes sense though ... if each client 
has it's own synonyms for updating that's fine, and if that exact same 
synonyms are used when that client queries that can also work -- as long 
as no client ever queries against any docs added by any other client, 
otherwise the missmatch of the synonyms will make the query non-sensical.

If that's your usecase however, then you most likely just want to setup a 
unique SolrCore for each client (then they can have whatever synonyms or 
fields they want)



-Hoss