You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by DM Smith <dm...@gmail.com> on 2006/06/21 19:35:11 UTC

Bug in BooleanScorer2

Hi,
I have just tried to compile lucene with ecj, Eclipse's compiler, and it
complains of errors with BooleanScorer2. The problematic construction is
present 2x in the class:
        if (doc() > lastScoredDoc) {
          lastScoredDoc = doc();
          coordinator.nrMatchers += super.nrMatchers;
        }
It complains about the calls to doc(), with the following error message:
       The method doc is defined in an inherited type and in an enclosing
scope.

Not sure what the solution should be:
this.doc();
BooleanScorer2.this.doc();
or
super.doc();

If I did, I'd send a patch.

-- DM Smith

Re: Bug in BooleanScorer2

Posted by DM Smith <dm...@gmail.com>.
On 6/21/06, Chris Hostetter <ho...@fucit.org> wrote:
>
>
> : > I haven't looed at the code so i'm not sure ... but my first thought
> would
> : > be to try both this.doc() and BooleanScorer2.this.doc(), and see which
> one
> : > passes all the unit tests.  Of course, if both of them pass the unit
> : > tests, then I'd be *really* worried.
>
> : Start worrying!
> : this.doc() and BooleanScorer2.this.doc() both passed the test.
>
> Hmmm... that is somewhat ominous isn't it?
>
> I would suggest opening a bug on this to track it (with specific compiler
> version, file version and line number info if you could) .. and if you
> have more time to help debug all the better


I have entered a bug for it and tried to debug it to see if there were an
obvious solution. Because I don't understand the code, I think someone else
will need to determine what it is doing.

Re: Bug in BooleanScorer2

Posted by Chris Hostetter <ho...@fucit.org>.
: > I haven't looed at the code so i'm not sure ... but my first thought would
: > be to try both this.doc() and BooleanScorer2.this.doc(), and see which one
: > passes all the unit tests.  Of course, if both of them pass the unit
: > tests, then I'd be *really* worried.

: Start worrying!
: this.doc() and BooleanScorer2.this.doc() both passed the test.

Hmmm... that is somewhat ominous isn't it?

I would suggest opening a bug on this to track it (with specific compiler
version, file version and line number info if you could) .. and if you
have more time to help debug all the better


-Hoss


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


Re: Bug in BooleanScorer2

Posted by Yonik Seeley <ys...@gmail.com>.
On 6/21/06, DM Smith <dm...@gmail.com> wrote:
> On 6/21/06, Chris Hostetter <ho...@fucit.org> wrote:
> >
> >
> > : Not sure what the solution should be:
> >
> > I haven't looed at the code so i'm not sure ... but my first thought would
> > be to try both this.doc() and BooleanScorer2.this.doc(), and see which one
> > passes all the unit tests.  Of course, if both of them pass the unit
> > tests, then I'd be *really* worried.
>
>
> Start worrying!
> this.doc() and BooleanScorer2.this.doc() both passed the test.
>
> super.doc() would be the same as this.doc()

doc() is the same as this.doc()
I'll make it explicit in the code.

-Yonik
http://incubator.apache.org/solr Solr, the open-source Lucene search server

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


Re: Bug in BooleanScorer2

Posted by DM Smith <dm...@gmail.com>.
On 6/21/06, Chris Hostetter <ho...@fucit.org> wrote:
>
>
> : Not sure what the solution should be:
>
> I haven't looed at the code so i'm not sure ... but my first thought would
> be to try both this.doc() and BooleanScorer2.this.doc(), and see which one
> passes all the unit tests.  Of course, if both of them pass the unit
> tests, then I'd be *really* worried.


Start worrying!
this.doc() and BooleanScorer2.this.doc() both passed the test.

super.doc() would be the same as this.doc()

Re: Bug in BooleanScorer2

Posted by Chris Hostetter <ho...@fucit.org>.
: Not sure what the solution should be:

I haven't looed at the code so i'm not sure ... but my first thought would
be to try both this.doc() and BooleanScorer2.this.doc(), and see which one
passes all the unit tests.  Of course, if both of them pass the unit
tests, then I'd be *really* worried.



-Hoss


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