It's almost what I've been doing, but I didn't write my own filter, I used SynonymFilterFactory.
Thanks On Sun, Jul 22, 2012 at 12:45 PM, Roman Chyla <roman.ch...@gmail.com> wrote: > Or for names that are more involved, you can use special > tokenizer/filter chain and index different variants of the name into > one index > > example: > https://github.com/romanchyla/montysolr/blob/solr-trunk/contrib/adsabs/src/java/org/apache/lucene/analysis/synonym/AuthorSynonymFilter.java > > roman > > On Sun, Jul 22, 2012 at 10:52 AM, Alireza Salimi > <alireza.sal...@gmail.com> wrote: > > Hi Ahmet, > > > > Thanks for the reply, Yes, actually after I posted the first question, > > I found that edismax is very helpful in this use case. There is another > > problem which is about hyphens in the search query. > > > > I guess I need to post it in another email. > > > > Thank you very much > > > > On Sun, Jul 22, 2012 at 3:35 AM, Ahmet Arslan <iori...@yahoo.com> wrote: > > > >> > So here is the problem, I have a requirement to implement > >> > search by a > >> > person name. > >> > Names consist of > >> > - first name > >> > - middle name > >> > - last name > >> > - nickname > >> > > >> > there is a list of synonyms which should be applied just for > >> > first name and > >> > middle name. > >> > > >> > In search, all fields should be searched for the search > >> > keyword. That's why > >> > I thought > >> > maybe having an aggregate field - named 'name' - which keeps > >> > all fields - by > >> > copyField tag - can be used for search. > >> > > >> > The problem is: how can I apply synonyms for first names and > >> > middle names, > >> > when I > >> > want to copy them into 'name' field? > >> > > >> > If you know of any link which is for using Solr to search > >> > for names, > >> > I would appreciate if you let me know. > >> > >> There is a flexible approach when you want to search over multiple > fields > >> having different field types. > http://wiki.apache.org/solr/ExtendedDisMax > >> You just specify the list of fields by qf parameter. > >> > >> &defType=edismax&qf=firstName^1.2 middleName lastName^1.5 nickname > >> > > > > > > > > -- > > Alireza Salimi > > Java EE Developer > -- Alireza Salimi Java EE Developer