You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Joaquin Delgado <jo...@triplehop.com> on 2005/01/18 01:00:41 UTC

Sub-Scoring of BooleanQuery

I'm interested in obtaining the individual scores of the top-level
sub-queries (query or Boolean clauses) when searching using a
BooleanQuery. The main purpose is to visualize scores of individual
queries representing concepts connected through a OR/AND operators
representing the union or intersection of concept spaces.

Has anyone done this before? Which would be an efficient way of doing
this?

Cheers,

-- Joaquin

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Re: Sub-Scoring of BooleanQuery

Posted by Paul Elschot <pa...@xs4all.nl>.
On Tuesday 18 January 2005 01:00, Joaquin Delgado wrote:
> I'm interested in obtaining the individual scores of the top-level
> sub-queries (query or Boolean clauses) when searching using a
> BooleanQuery. The main purpose is to visualize scores of individual
> queries representing concepts connected through a OR/AND operators
> representing the union or intersection of concept spaces.
> 
> Has anyone done this before? Which would be an efficient way of doing
> this?

I don't know whether visualisation of connected query scores has been done
in Lucene.

In the normal I/O bound case, it's more efficient to run OR'ed subqueries
after each other than intermixed as subqueries of a BooleanQuery.
The reason is that this avoid disk seeks "between the subqueries".
BooleanScorer runs the subscorers intermixed.

For AND'ed subqueries the ConjunctionScorer is used that skips
to common documents before scoring. This skipping could make
the intermixed case more efficient, but it's impossible to know for sure 
in advance.

Getting to the scores of subqueries is probably most easily done by
adding a bit of code to BooleanScorer or ConjunctionScorer.

In case you want to use another scorer for the top level:
http://www.mail-archive.com/lucene-user@jakarta.apache.org/msg10453.html

Regards,
Paul Elschot


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org