Yes that would probably be a lot of fields.. I guess a way would be to extend the SynonymFilter and change the format of the synonyms.txt file to take the categories into account.
Thanks again for your answer. ________________________________ From: lee carroll <lee.a.carr...@googlemail.com> To: solr-user@lucene.apache.org Sent: Wednesday, June 1, 2011 12:23 PM Subject: Re: Synonyms valid only in specific categories of data I don't think you can assign a synonyms file dynamically to a field. you would need to create multiple fields for each lang / cat phrases and have their own synonyms file referenced for each field. that would be a lot of fields..... On 1 June 2011 09:59, Spyros Kapnissis <ska...@yahoo.com> wrote: > Hello to all, > > > I have a collection of text phrases in more than 20 languages that I'm > indexing > in solr. Each phrase belongs to one of about 30 different phrase categories. I > have specified different fields for each language and added a synonym filter > at > query time. I would however like the synonym filter to take into account the > category as well. So, a specific synonym should be valid and used only in one > or > more categories per language. (the category is indexed in another field). > > Is this somehow possible in the current SynonymFilterFactory implementation? > > Hope it makes sense. > > Thank you, > Spyros >