Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BoboIndexReader.IsCurrent() #18

Open
dtosato opened this issue May 19, 2015 · 1 comment
Open

BoboIndexReader.IsCurrent() #18

dtosato opened this issue May 19, 2015 · 1 comment
Labels

Comments

@dtosato
Copy link

dtosato commented May 19, 2015

@NightOwl888
Could you please check the method BoboIndexReader.IsCurrent()? It does not work to me because it throws exception.

@NightOwl888
Copy link
Owner

The IsCurrent method is inherited from Lucene.Net.Index.FilterIndexReader, whose implementation looks like this:

        public override bool IsCurrent()
        {
            base.EnsureOpen();
            return this.in_Renamed.IsCurrent();
        }

BoboIndexReader does not override IsCurrent.

The in_Renamed variable is of type Lucene.Net.Index.IndexReader whose IsCurrent implementation looks like:

        public virtual bool IsCurrent()
        {
            throw new NotSupportedException("This reader does not support this method.");
        }

I checked the Lucene (Java) source and it is implemented the same way.

In other words, the exact behavior depends on the type of IndexReader being passed to the constructor of BoboIndexReader and it must be overridden by the specialized IndexReader in order to function.

So, the question is, what type of IndexReader are you passing to the BoboIndexReader? Is it open?

The expected behavior for each type of IndexReader is defined here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants