Hi, Instead of searching for "Car Dealer" search for +"Car Dealer". This will match only Doc A.
Otis -- Search Analytics - http://sematext.com/search-analytics/index.html Performance Monitoring - http://sematext.com/spm/index.html On Wed, Oct 3, 2012 at 10:09 AM, Nicholas Ding <nicholas...@gmail.com> wrote: > Hi, > > I'm working on a special requirement for matching. One thing is confusing > me, I can't find a good way to solve it. > > Doc A has keywords "Car Dealer", "Car Repair" > Doc B has keywords "Car Washing", "Car Clean" > > I have a "Optional Keywords" list that contains keywords like "Dealer". > > If my query is "Car Repair" should only match Doc A. > If my query is "Car", should match "Car Dealer", because "Dealer" is an > optional keyword, but if the query is only "Dealer", no documents should be > matched. > > And also, I need to apply stemming rules into keywords. > "Car Repair" => "Cars Repair", "Car Repairing", "Cars Repairs", etc. > > I was wondering if there are any existing Tokenizer for Filter in Solr can > implement this requirement. So far as I know, in order to match the whole > keyword, I can use KeywordTokenzerFactory, but can I apply stemming rules > inside the Token if the token has multiple words inside. > > Thanks > Nicholas