0

I'm a newbie to solr.

Here is my problem:

When I search 天天爱消除,my tokenizer will split it to: 天天 & & 消除.

I use disMax mode, and the query goes like this:

http://search.dev/solr/collection1/select?q=%E7%88%B1%E6%B6%88%E9%99%A4&defType=dismax&qf=name&wt=json&indent=true&omitHeader=true&rows=500&hl=true&hl.fl=name&hl.simple.pre=<em>&hl.simple.post=<%2Fem>&sort=score+desc

This would match results like this: 我爱记单词 & 我爱读书. For me, the relevances of them are to low, so I don't want to show them in the results.

In conclusion, I want to ditch the results that match one term and the term length is 1;

Hope to get some help. Thanks.


update:

Need I to set a custom Collector?

Lynn
  • 665
  • 8
  • 25

1 Answers1

0

If you are talking about having at least 2 term matches from your query , I do not think you need a special collector for this.

You need to use &mm=2 with the rest of your URL/query, here is the documentation with example => http://wiki.apache.org/solr/DisMaxQParserPlugin

Arun
  • 1,777
  • 10
  • 11
  • Thanks for your advice. If I set mm=2: `At least 2 of the optional clauses must match, regardless of how many clauses there are: "2"` I think it will also make `天天跑酷` (=> `天天` & `跑酷`) get removed from results. Am I right? I just want to remove the results that contains one term match, and that term's length is 1. If it's length > 2, I want to keep it. – Lynn Dec 04 '13 at 14:13