Have you looked at boosting? Something like:
(term1 AND term2)^100 or term1 or term2
See:
http://lucene.apache.org/java/3_0_2/queryparsersyntax.html#Boosting a Term

Even more, consider the dismax query parser, see:
http://wiki.apache.org/solr/DisMaxRequestHandler

Especially with dismax, you can fine-tune boosts a lot.

HTH
Erick

On Fri, Sep 3, 2010 at 4:04 PM, javaxmlsoapdev <vika...@yahoo.com> wrote:

>
> I am using solr 1.4 version.
>
> I have a requirement where need to show up all documents first which
> matched
> most words from the free text search string. e.g. If user was searching for
> two words with no quotes "connectivity breakup" my search results should
> display all documents where both words matched first and then those docs
> where one or the other word (from those two search words) matched.
>
> And those two search words could be present in two separate fields in solr
> index then also I need to rank that document higher up.
>
> can someone explain how this can be achieved in Solr.
>
> Thanks,
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Boost-weight-proximity-ranking-which-one-tp1414512p1414512.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to