Re: Using coord of one BooleanQuery as a multiplier for its siblings

2012-09-13 Thread pranshu
Any ideas on this? Thanks!



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Using-coord-of-one-BooleanQuery-as-a-multiplier-for-its-siblings-tp4003736p4007675.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org



Re: Using coord of one BooleanQuery as a multiplier for its siblings

2012-09-07 Thread pranshu
Ah yes, that is what I meant by coord = 1. Coord is disabled for BQ0 and BQ2.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Using-coord-of-one-BooleanQuery-as-a-multiplier-for-its-siblings-tp4003736p4006220.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org



Re: Using coord of one BooleanQuery as a multiplier for its siblings

2012-08-29 Thread Robert Muir
On Mon, Aug 27, 2012 at 8:31 PM, pranshu sharma  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-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org



Using coord of one BooleanQuery as a multiplier for its siblings

2012-08-28 Thread pranshu sharma
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?

Thanks a lot!

Pranshu