[prev in list] [next in list] [prev in thread] [next in thread]
List: lucene-user
Subject: Re: Using coord of one BooleanQuery as a multiplier for its siblings
From: Robert Muir <rcmuir () gmail ! com>
Date: 2012-08-29 15:04:10
Message-ID: CAOdYfZXkD9g=YiEUpAxo_6pestv50YgkvcEUmEaW6A0=CEEtNQ () mail ! gmail ! com
[Download RAW message or body]
On Mon, Aug 27, 2012 at 8:31 PM, pranshu sharma <pranshu@cis.upenn.edu> wrote:
> Hi there,
>
> I had a question about migrating the coord value one level up. My current
> query structure has a root BooleanQuery with a bunch of nested BooleanQuery
> children: one of these looks for all terms in the query issued, and I want
> to apply the coord factor for this BooleanQuery to all its siblings. The
> idea here is to have the overall score reflect the number of tokens matched.
>
> For example, if the query is 'apple banana orange', my query structure
> looks like this:
>
> BQ0 (root): coord = 1
> BQ1: (coord enabled)
> BQ1a: +apple
> BQ1b: +banana
> BQ1c: +orange
> BQ2: (coord = 1)
> BQ2a: 'apple banana'
> BQ2b: 'banana orange'
> ...
>
> (BQ2 basically takes care of bigrams.)
>
> Now, if I have two documents that look like:
>
> Doc A: apple orange banana
> Doc B: apple banana
>
> Doc A would get a higher overall score if the score from BQ2 is multiplied
> with coord for BQ1 (=2/3), than if it wasn't. Could you recommend how I go
> about implementing this idea?
I think you want to use BooleanQuery's disableCoord option for BQ2 and BQ0 ?
--
lucidworks.com
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic