You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by GitBox <gi...@apache.org> on 2021/10/18 17:32:17 UTC

[GitHub] [lucenenet] NightOwl888 commented on issue #527: ArgumentNullException with BlendedInfixSuggester (v. 4.8.0-beta00014)

NightOwl888 commented on issue #527:
URL: https://github.com/apache/lucenenet/issues/527#issuecomment-946001575


   Thanks for the report.
   
   I had a look at the built-in [InputArrayEnumerator](https://github.com/apache/lucenenet/blob/3dcffb2929662ffb9c4678458eaf90f0df300f92/src/Lucene.Net.Tests.Suggest/Suggest/InputArrayIterator.cs) class in the tests, and I believe I have spotted the issue.
   
   This enumerator has a bit of an unusual requirement, as it is loading the initial state in the constructor, so the `Current` property should only be `null` after `MoveNext()` returns `false`. When the enumerator first loads, it is expected to be pointing to the initial value. The first call to `MoveNext()` will not move the pointer if there is a first value and will act like a no-op. Then every additional call will act similar to normal, incrementing and updating the `Current` property.
   
   On the face of things, admittedly this seems highly unusual, and makes the `IInputIterator` interface difficult to implement. We should update the documentation to highlight this unusual requirement.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org