Hi Leo, Yes, my image is similar to yours. > If the value ends with "_CAT1" ==> use > as keepword file "keepwords1.txt" and so on?
But my second option is not about configurations, but "customizing" Solr. Utilizing customizability of Lucene/Solr, you can write your own TokenFilter class. Maybe your requirement is satisfied by subclassing org.apache.lucene.analysis.util.FilteringTokenFilter. The custom filter class will take multiple keepword files, and build multiple word sets (KeepwordFilter have only single word set), and switch the word sets by field value's prefix (or other information.) That is just my draft idea, there should be more sophisticated way... If you are interested in (and familiar with Java programming of course,) you would want to check out Solr source code from SVN and browse KeepwordFilter / KeepwordFilterFactory class for getting implementation image. Thanks, Tomoko 2014-12-22 17:10 GMT+09:00 leostro <leo.orland...@gmail.com>: > Hi Tomoko, > > I understand you first reply and the first hint (one field for each > categoryid). > I thought this was a relatively "common" scenario. > > I'm interested in understanding the option you are talking about in the > second reply. > > > you can tell "which keepwords set (file) shoud be used" to custom filter > > by > > adding special prefix (or something like) to the target field value. > > but of course it makes indexing/querying process slightly complicated. > > Are you talking about adding a postfix (like _CAT1) at value of the field > I'm going to analyze with keepwords? If the value ends with "_CAT1" ==> use > as keepword file "keepwords1.txt" and so on? > > I can't understand how to reach this goal, have you seen some configuration > examples? > I didn't find anything :( > > Thanks > Leo > > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/different-keepword-files-for-differents-field-values-tp4175474p4175528.html > Sent from the Solr - User mailing list archive at Nabble.com. >