lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Krupansky" <j...@basetechnology.com>
Subject Re: Max Score Query parser?
Date Mon, 25 Feb 2013 22:57:40 GMT
Bite the bullet and use a function query for the boost: 
&bf=max(query({!v='field:C'}),query({!v='field:D'}),query({!v='field:E'}))

-- Jack Krupansky

-----Original Message----- 
From: Jan Høydahl
Sent: Monday, February 25, 2013 6:32 AM
To: solr-user@lucene.apache.org
Subject: Max Score Query parser?

Hi,

A customer sends large, deeply nested boolean queries to Solr using the 
default (lucene) parser.
The default scoring is summing up all the scores. For parts of this query 
they would like
to use the Max score instead of the sum, e.g. for q=+A +B +(C D E) we want 
the max
of C,D,E. I was thinking about writing a MaxScoreQParserPlugin returning the 
max of any of its clauses,
so you could express the business requirement as this query: q=+A +B 
+_query_:"{!maxscore}C D E",
where C D E could in turn be nested boolean expressions.

I cannot use DisMax, cause it only returns max across multiple fields, not 
across multiple clauses.

Perhaps something like this exists somewhere? If not, any pointers for where 
to start, since I'm not
intimately familiar with the Scorer/Weight APIs?

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com 


Mime
View raw message