paulirwin commented on code in PR #1058:
URL: https://github.com/apache/lucenenet/pull/1058#discussion_r1997641784


##########
src/Lucene.Net.Spatial/Prefix/PrefixTreeStrategy.cs:
##########
@@ -157,17 +158,28 @@ public virtual Field[] CreateIndexableFields(IShape? 
shape, double distErr)
             IndexOptions = IndexOptions.DOCS_ONLY
         }.Freeze();
 
-        /// <summary>Outputs the tokenString of a cell, and if its a leaf, 
outputs it again with the leaf byte.</summary>
+        /// <summary>
+        /// Outputs the tokenString of a cell, and if its a leaf, outputs it 
again with the leaf byte.
+        /// </summary>
+        /// <remarks>
+        /// LUCENENET specific - This class originally took an enumerator, 
which meant that it could not
+        /// be reused (since most IEnumerator implementations can only be 
iterated once and throw on

Review Comment:
   I also kept the lazy-initialization logic, as it helps keep it cleaner IMO, 
as well as supports `Close()` by disposing of the enumerator but in a reusable 
way. I think it makes sense to reallocate a new enumerator if you close that 
token stream and then reset it.



-- 
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-unsubscr...@lucenenet.apache.org

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

Reply via email to