chenhh021 opened a new issue, #644:
URL: https://github.com/apache/lucenenet/issues/644

   Hi,
   
   when trying to index a point with coordinate (144502.06, 639062.07) in 
Lucene.Net.Spatial, a System.ArgumentOutOfRangeException is thrown out.  The 
stack trace is listed below. This bug can be reproduced by [this 
test](https://github.com/apache/lucenenet/commit/956c78c9eed7548a1069f5633510c7aa351a9ad4).
   
   `System.ArgumentOutOfRangeException: Index was out of range. Must be 
non-negative and less than the size of the collection. (Parameter 'index')
   Actual value was 0.
      at J2N.Collections.Generic.List‘1.get_Item(Int32 index)
      at Lucene.Net.Spatial.Prefix.Tree.QuadPrefixTree.GetCell(IPoint p, Int32 
level) in 
D:\chh\SE\projects\lucenenet\src\Lucene.Net.Spatial\Prefix\Tree\QuadPrefixTree.cs:line
 167
      at Lucene.Net.Spatial.Prefix.Tree.SpatialPrefixTree.GetCells(IPoint p, 
Int32 detailLevel, Boolean inclParents) in 
D:\chh\SE\projects\lucenenet\src\Lucene.Net.Spatial\Prefix\Tree\SpatialPrefixTree.cs:line
 286
      at Lucene.Net.Spatial.Prefix.Tree.SpatialPrefixTree.GetCells(IShape 
shape, Int32 detailLevel, Boolean inclParents, Boolean simplify) in 
D:\chh\SE\projects\lucenenet\src\Lucene.Net.Spatial\Prefix\Tree\SpatialPrefixTree.cs:line
 204
      at 
Lucene.Net.Spatial.Prefix.PrefixTreeStrategy.CreateIndexableFields(IShape 
shape, Double distErr) in 
D:\chh\SE\projects\lucenenet\src\Lucene.Net.Spatial\Prefix\PrefixTreeStrategy.cs:line
 139
      at 
Lucene.Net.Spatial.Prefix.PrefixTreeStrategy.CreateIndexableFields(IShape 
shape) in 
D:\chh\SE\projects\lucenenet\src\Lucene.Net.Spatial\Prefix\PrefixTreeStrategy.cs:line
 133
      at Lucene.Net.Spatial.StrategyTestCase.newDoc(String id, IShape shape) in 
D:\chh\SE\projects\lucenenet\src\Lucene.Net.Tests.Spatial\StrategyTestCase.cs:line
 220
      at Lucene.Net.Spatial.StrategyTestCase.adoc(String id, IShape shape) in 
D:\chh\SE\projects\lucenenet\src\Lucene.Net.Tests.Spatial\StrategyTestCase.cs:line
 211
      at Lucene.Net.Spatial.RobustnessTest.QuadTreeRobustness() in 
D:\chh\SE\projects\lucenenet\src\Lucene.Net.Tests.Spatial\RobustnessTest.cs:line
 46`
   
   Configurations:
   ```c#
   SpatialContextFactory test_factory = new SpatialContextFactory();
   test_factory.IsGeo = false;
   test_factory.WorldBounds = new Rectangle(0.0, 700000.0, 0.0, 650000.0, null);
   
   SpatialContext ctx = new SpatialContext(test_factory);
   SpatialPrefixTree grid; SpatialStrategy strategy;
   
   grid = new QuadPrefixTree(ctx, 40);
   strategy = new RecursivePrefixTreeStrategy(grid, "recursive_quad");
   ```
   
   I am new to the community, please let me know if I did anything unproper. 
Thanks in advance!


-- 
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.apache.org

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

Reply via email to