lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Elschot (JIRA)" <>
Subject [jira] [Updated] (LUCENE-7580) Spans tree scoring
Date Thu, 29 Dec 2016 23:07:58 GMT


Paul Elschot updated LUCENE-7580:
    Attachment: LUCENE-7580.patch

Patch of 29 Dec 2016.

Compared to the previous patch, this adds:

Limiting the max allowed slop to Integer.MAX_VALUE-1 in the SpanNearQuery constructor and
in TestSpanSearchEquivalence. An actual slop of Integer.MAX_VALUE causes an overflow in distance+1
that is used in computeSlopFactor. Since the same limitation is already present for indexed
positions, I would not expect this slop factor miscalculation to actually occur.

The negative slops that occur for overlapping spans are changed to 0 before passing them to
computeSlopFactor in NearSpansDocScorer in the patch here.

The non match distance passed to SpanNearQuery in the patch is verified to be at least the
given slop.

A wrapper method SpansTreeScorer.wrap() is added that will wrap the span (subqueries of a)
given query in a SpansTreeQuery. This works for span subqueries of BooleanQuery, DisjunctionMaxQuery
and BoostQuery.

> Spans tree scoring
> ------------------
>                 Key: LUCENE-7580
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/search
>    Affects Versions: master (7.0)
>            Reporter: Paul Elschot
>            Priority: Minor
>             Fix For: 6.x
>         Attachments: LUCENE-7580.patch, LUCENE-7580.patch, LUCENE-7580.patch
> Recurse the spans tree to compose a score based on the type of subqueries and what matched

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message