lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] [Commented] (LUCENE-7311) TermWeight shoud seek terms lazily
Date Thu, 02 Jun 2016 08:57:59 GMT


Robert Muir commented on LUCENE-7311:

Well, i personally think TermQuery/TermWeight should be very easy to follow and understand.
If its not: there is no hope for any of our other queries.

I don't think we should explicitly optimize for abusive cases here, potentially causing bugs
and making the code impossible to work with.

If we can simplify/redesign Weight so that this stuff is more natural, then I think thats
fine, but I think there are too many special cases in the code already.

Some of these special cases might be easy to fix, just by doing some janitorial work. e.g.
what is TermContext.hasOnlyRealTerms()? Do we still need this, is only to support autoprefix?
Should we just remove autoprefix and these apis now that we have points? 

> TermWeight shoud seek terms lazily
> ----------------------------------
>                 Key: LUCENE-7311
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-7311.patch
> Currently the terms are seeked eagerly in TermQuery.createWeight when creating the TermContext.
This might be wasteful when scores are not needed since the query might be cached on some
segments, thus seeking the term on these segments is not needed. We could change TermWeight
to only seek terms in Weight.scorer when scores are not needed.

This message was sent by Atlassian JIRA

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

View raw message