eladmarg opened a new issue #319:
URL: https://github.com/apache/lucenenet/issues/319


   Hi,
   I'm getting this exception sometimes, this is on heavily indexed production 
environment, 
   couldn't reproduce this locally.
   its happening rarely, with unknown reason / pattern.
   
   all I'm doing is simple spatial search, points close to point, ordered by 
distance.
   I'm using 10km radius filter, with matchalldocs query and sort by distance.
   
   code for sort:
    
   ```
   var point = SpatialContext.MakePoint(lon, lat);
   var valueSource = SpatialStrategy.MakeDistanceValueSource(point, 
DistanceUtils.DEG_TO_KM);
   var sort = new Sort(valueSource.GetSortField(false)).Rewrite(indexSearcher);
   ```
   the exception:
   
   System.NullReferenceException: Object reference not set to an instance of an 
object.  
      at Spatial4n.Core.Util.GeohashUtils.DecodeBoundary(String geohash, 
SpatialContext ctx)  
      at Spatial4n.Core.Util.GeohashUtils.Decode(String geohash, SpatialContext 
ctx)  
      at 
Lucene.Net.Spatial.Util.ShapeFieldCacheProvider`1.<GetCache>b__5_0(IndexReader 
key)  
      at System.Runtime.CompilerServices.ConditionalWeakTable`2.GetValue(TKey 
key, CreateValueCallback createValueCallback)  
      at 
Lucene.Net.Spatial.Util.ShapeFieldCacheDistanceValueSource.CachedDistanceFunctionValue..ctor(AtomicReader
 reader, ShapeFieldCacheDistanceValueSource enclosingInstance)  
      at 
Lucene.Net.Spatial.Util.ShapeFieldCacheDistanceValueSource.GetValues(IDictionary
 context, AtomicReaderContext readerContext)  
      at 
Lucene.Net.Queries.Function.ValueSource.ValueSourceComparer.SetNextReader(AtomicReaderContext
 context)  
      at 
Lucene.Net.Search.TopFieldCollector.OneComparerNonScoringCollector.SetNextReader(AtomicReaderContext
 context)  
      at Lucene.Net.IndexSearcher.Search.Search(IList`1 leaves, Weight weight, 
ICollector collector)  
      at Lucene.Net.IndexSearcher.Search.Search(IList`1 leaves, Weight weight, 
FieldDoc after, Int32 nDocs, Sort sort, Boolean fillFields, Boolean 
doDocScores, Boolean doMaxScore)  
      at Lucene.Net.IndexSearcher.Search.Search(Weight weight, FieldDoc after, 
Int32 nDocs, Sort sort, Boolean fillFields, Boolean doDocScores, Boolean 
doMaxScore)  
   
   
   any ideas?
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to