If we end up keeping Weight, I don't think the Changes entry on back compat says enough? If you overrode protected Weight createWeight(Query query) throws IOException, its not called anymore so you are dead in the water? And just overall, it appears to be a break, but the instructions don't tell me enough about how to handle - just the Wrapper mention is not enough?

- Mark

Mark Miller wrote:
This is a little different than what Grant was talking about.

For the old variants to work, I think you have to call the Searcher methods that take an old style weight.
Its not an ideal break, I know.

I think we might consider just dropping Weight? If we make the issue with 1771 a compile time break (which I think makes sense) I think that leads to just dropping Weight for QueryWeight.

- Mark

Peter Keegan wrote:
I got it to work by adding new overrides:

public QueryWeight createQueryWeight(Searcher searcher) throws IOException public Scorer scorer(IndexReader reader, boolean scoreDocsInOrder, boolean topScorer) throws IOException

But, it seems like it should still work with the old overrides:

protected Weight createWeight(Searcher searcher) throws IOException
public Scorer scorer(IndexReader reader) throws IOException

Peter


On Wed, Aug 5, 2009 at 12:29 PM, Peter Keegan <peterlkee...@gmail.com <mailto:peterlkee...@gmail.com>> wrote:

    I ran into the same problem trying to update the BoostingNearQuery
    patch in *LUCENE-1341
    <https://issues.apache.org/jira/browse/LUCENE-1341>.
    *The scorer never gets called. This used to work in 2.3.2

    Peter


    On Wed, Aug 5, 2009 at 11:01 AM, Mark Miller
    <markrmil...@gmail.com <mailto:markrmil...@gmail.com>> wrote:

        Grant Ingersoll wrote:


            On Aug 5, 2009, at 10:07 AM, Mark Miller wrote:

                Yeah - SpanQuery's don't use the boosts from subspans
                - it just uses the idf for the query terms and the
                span length I believe - and the boost for the top
                level Query.

                Is that the right way to go? I guess Doug seemed to
                think so? I don't know. It is sort of a bug that lower
                boosts would be ignored right? There is an issue for
                it somewhere.

                It gets complicated quick to change it - all of a
                sudden you need something like BooleanQuery ...


            Not sure it needs BooleanQuery, but it does seem like it
            should take into account the scores of the subclauses
            (regardless of BoostingTermQuery).  There is a spot in
            creating the SpanScorer where it gets the value from the
            QueryWeight, but this QueryWeight does not account for the
            subclauses QueryWeights.


        It doesn't need BooleanQuery - it needs BooleanQuery type
        logic - which is fairly complicated. At least to do it right I
        think. I don't have a clear memory of it, but I started to try
        and address this once and ...
        well I didn't continue.


        --         - Mark

        http://www.lucidimagination.com




---------------------------------------------------------------------
        To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
        <mailto:java-dev-unsubscr...@lucene.apache.org>
        For additional commands, e-mail:
        java-dev-h...@lucene.apache.org
        <mailto:java-dev-h...@lucene.apache.org>







--
- Mark

http://www.lucidimagination.com




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

Reply via email to