> I suppose SpanTermQuery could override the weight/scorer methods so that
> it behaved more like a TermQuery if it was executed directly ... but
> that's really not what it's intended for.

This is currently the only way to boost a term via payloads.
BoostingTermQuery extends SpanTermQuery.

> if you're talking about a SpanNearQuery of "the quick brown fox" vs a
> SpanNearQuery of "brown fox" -- both against some doc like "hey look, the
> quick brown fox jumped very high" -- then sure, that doc might produce a
> lower score for the first query then it does for the second query ... but
> scores from differnet queries aren't comparable.

Yes, this is the case I meant. To the casual observer, they both appear to
be "exact matches' with respect to term frequency. However, I realize that
the first query would score higher than the 2nd if all 4 terms were indexed
at the same position. I guess this is part of the point you're making about
spans. Would a plain PhraseQuery behave this way, too?

Peter

On Wed, Mar 11, 2009 at 3:16 PM, Chris Hostetter
<hossman_luc...@fucit.org>wrote:

>
> : For a SpanNearQuery that contains SpanTermQueries, the score for a match
> on
> : "the quick brown fox" would be lower than a match on "brown fox" because
> of
> : the edit distance (4 vs 2). This seems counter intuitive, too.
>
> you have to clarify what you mean ...
>
> if you're talking about a SpanNearQuery of "the quick brown fox" vs a
> SpanNearQuery of "brown fox" -- both against some doc like "hey look, the
> quick brown fox jumped very high" -- then sure, that doc might produce a
> lower score for the first query then it does for the second query ... but
> scores from differnet queries aren't comparable.
>
> if you mean that a doc containing "the quick brown fox" will score lower
> then a doc containing just "brown fox" then you have to elaborate on waht
> query structure you're talking about where this is true.
>
>
>
> -Hoss
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-user-h...@lucene.apache.org
>
>

Reply via email to