I should investigate that, as usually synonyms are analysis stage. A simple way is to replace the word with all its synonyms ( including original word), but simply using this kind of processor will change the token position and offsets, modifying the actual content of the document .
" I am from Bombay" will become " I am from Bombay Mumbai" which can be annoying. So a clever approach must be investigated. 2015-05-26 17:36 GMT+01:00 Aman Tandon <amantandon...@gmail.com>: > Okay So how could I do it with UpdateProcessors? > > With Regards > Aman Tandon > > On Tue, May 26, 2015 at 10:00 PM, Alessandro Benedetti < > benedetti.ale...@gmail.com> wrote: > > > mmm this is different ! > > Without any customisation, right now you could : > > - use docValues to provide exact value facets. > > - Than you can use a copy field, with the proper analysis, to search > when a > > user click on a filter ! > > > > So you will see in your facets : > > Mumbai(3) > > Bombay(2) > > > > And when clicking you see 5 results. > > A little bit misleading for the users … > > > > On the other hand if you you want to apply the synonyms before, the > > indexing pipeline ( because docValues field can not be analysed), I think > > you should play with UpdateProcessors. > > > > Cheers > > > > 2015-05-26 17:18 GMT+01:00 Aman Tandon <amantandon...@gmail.com>: > > > > > We are interested in using docValues for better memory utilization and > > > speed. > > > > > > Currently we are faceting the search results on *city. *In city we have > > > also added the synonym for cities like mumbai, bombay (These are Indian > > > cities). So that result of mumbai is also eligible when somebody will > > > applying filter of bombay on search results. > > > > > > I need this functionality to apply with docValues enabled field. > > > > > > With Regards > > > Aman Tandon > > > > > > On Tue, May 26, 2015 at 9:19 PM, Alessandro Benedetti < > > > benedetti.ale...@gmail.com> wrote: > > > > > > > I checked in the Documentation to be sure, but apparently : > > > > > > > > DocValues are only available for specific field types. The types > chosen > > > > determine the underlying Lucene docValue type that will be used. The > > > > available Solr field types are: > > > > > > > > - StrField and UUIDField. > > > > - If the field is single-valued (i.e., multi-valued is false), > > Lucene > > > > will use the SORTED type. > > > > - If the field is multi-valued, Lucene will use the SORTED_SET > > > type. > > > > - Any Trie* numeric fields and EnumField. > > > > - If the field is single-valued (i.e., multi-valued is false), > > Lucene > > > > will use the NUMERIC type. > > > > - If the field is multi-valued, Lucene will use the SORTED_SET > > > type. > > > > > > > > > > > > This means you should not analyse a field where DocValues is enabled. > > > > Can your explain us your use case ? Why are you interested in > synonyms > > > > DocValues level ? > > > > > > > > Cheers > > > > > > > > 2015-05-26 13:32 GMT+01:00 Upayavira <u...@odoko.co.uk>: > > > > > > > > > To my understanding, docValues are just an uninverted index. That > is, > > > it > > > > > contains the terms that are generated at the end of an analysis > > chain. > > > > > Therefore, you simply enable docValues and include the > > > > > SynonymFilterFactory in your analysis. > > > > > > > > > > Is that enough, or are you struggling with some other issue? > > > > > > > > > > Upayavira > > > > > > > > > > On Tue, May 26, 2015, at 12:03 PM, Aman Tandon wrote: > > > > > > Hi, > > > > > > > > > > > > We have some field *city* in which the docValues are enabled. We > > need > > > > to > > > > > > add the synonym in that field so how could we do it? > > > > > > > > > > > > With Regards > > > > > > Aman Tandon > > > > > > > > > > > > > > > > > > > > > -- > > > > -------------------------- > > > > > > > > Benedetti Alessandro > > > > Visiting card : http://about.me/alessandro_benedetti > > > > > > > > "Tyger, tyger burning bright > > > > In the forests of the night, > > > > What immortal hand or eye > > > > Could frame thy fearful symmetry?" > > > > > > > > William Blake - Songs of Experience -1794 England > > > > > > > > > > > > > > > -- > > -------------------------- > > > > Benedetti Alessandro > > Visiting card : http://about.me/alessandro_benedetti > > > > "Tyger, tyger burning bright > > In the forests of the night, > > What immortal hand or eye > > Could frame thy fearful symmetry?" > > > > William Blake - Songs of Experience -1794 England > > > -- -------------------------- Benedetti Alessandro Visiting card : http://about.me/alessandro_benedetti "Tyger, tyger burning bright In the forests of the night, What immortal hand or eye Could frame thy fearful symmetry?" William Blake - Songs of Experience -1794 England