ayende/ravendb — pull request #255 by sibartlett (2013-02-12 14:08:45+00:00)
Title: Broken spatial test

Broken spatial test; 2 near identical tests, 1 passes and the other fails - the only different being they use different indexes.

Exception:

Raven.Tests.Spatial.SimonBartlett.GeohashIndexLevel7_LineStringShouldNotThrowException : System.IndexOutOfRangeException : Index was outside the bounds of the array.
Stack Trace:
at Spatial4n.Core.Util.GeohashUtils.DecodeBoundary(String geohash, SpatialContext ctx) in c:\Work\Spatial4n\Spatial4n.Core\Util\GeohashUtils.cs:line 163
at Lucene.Net.Spatial.Prefix.Tree.GeohashPrefixTree.GhCell.GetShape() in c:\Work\lucene.net\src\contrib\Spatial\Prefix\Tree\GeohashPrefixTree.cs:line 141
at Lucene.Net.Spatial.Prefix.PointPrefixTreeFieldCacheProvider.ReadShape(Term term) in c:\Work\lucene.net\src\contrib\Spatial\Prefix\PointPrefixTreeFieldCacheProvider.cs:line 48
at Lucene.Net.Spatial.Util.ShapeFieldCacheProvider`1.GetCache(IndexReader reader) in c:\Work\lucene.net\src\contrib\Spatial\Util\ShapeFieldCacheProvider.cs:line 83
at Lucene.Net.Spatial.Util.ShapeFieldCacheDistanceValueSource.GetValues(IndexReader reader) in c:\Work\lucene.net\src\contrib\Spatial\Util\ShapeFieldCacheDistanceValueSource.cs:line 90
at Lucene.Net.Spatial.Util.ReciprocalFloatFunction.GetValues(IndexReader reader) in c:\Work\lucene.net\src\contrib\Spatial\Util\ReciprocalFloatFunction.cs:line 72
at Lucene.Net.Search.Function.ValueSourceQuery.ValueSourceWeight.Scorer(IndexReader reader, Boolean scoreDocsInOrder, Boolean topScorer) in c:\Work\lucene.net\src\core\Search\Function\ValueSourceQuery.cs:line 125
at Lucene.Net.Search.Function.CustomScoreQuery.CustomWeight.Scorer(IndexReader reader, Boolean scoreDocsInOrder, Boolean topScorer) in c:\Work\lucene.net\src\core\Search\Function\CustomScoreQuery.cs:line 427
at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Collector collector) in c:\Work\lucene.net\src\core\Search\IndexSearcher.cs:line 225
at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort, Boolean fillFields) in c:\Work\lucene.net\src\core\Search\IndexSearcher.cs:line 213
at Lucene.Net.Search.IndexSearcher.Search(Weight weight, Filter filter, Int32 nDocs, Sort sort) in c:\Work\lucene.net\src\core\Search\IndexSearcher.cs:line 194
at Lucene.Net.Search.Searcher.Search(Query query, Filter filter, Int32 n, Sort sort) in c:\Work\lucene.net\src\core\Search\Searcher.cs:line 57
at Raven.Database.Indexing.Index.IndexQueryOperation.ExecuteQuery(IndexSearcher indexSearcher, Query luceneQuery, Int32 start, Int32 pageSize, IndexQuery indexQuery) in c:\code\ravendb\Raven.Database\Indexing\Index.cs:line 1161
at Raven.Database.Indexing.Index.IndexQueryOperation.d__58.MoveNext() in c:\code\ravendb\Raven.Database\Indexing\Index.cs:line 835
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at Raven.Database.DocumentDatabase.<>c__DisplayClass99.b__90(IStorageActionsAccessor actions) in c:\code\ravendb\Raven.Database\DocumentDatabase.cs:line 1203
at Raven.Storage.Managed.TransactionalStorage.ExecuteBatch(Action`1 action) in c:\code\ravendb\Raven.Database\Storage\Managed\TransactionalStorage.cs:line 128
at Raven.Storage.Managed.TransactionalStorage.Batch(Action`1 action) in c:\code\ravendb\Raven.Database\Storage\Managed\TransactionalStorage.cs:line 109
at Raven.Database.DocumentDatabase.Query(String index, IndexQuery query) in c:\code\ravendb\Raven.Database\DocumentDatabase.cs:line 1142
at Raven.Client.Embedded.EmbeddedDatabaseCommands.Query(String index, IndexQuery query, String[] includes, Boolean metadataOnly, Boolean indexEntriesOnly) in c:\code\ravendb\Raven.Client.Embedded\EmbeddedDatabaseCommands.cs:line 393
at Raven.Client.Document.AbstractDocumentQuery`2.ExecuteActualQuery() in c:\code\ravendb\Raven.Client.Lightweight\Document\AbstractDocumentQuery.cs:line 534
at Raven.Client.Document.AbstractDocumentQuery`2.InitSync() in c:\code\ravendb\Raven.Client.Lightweight\Document\AbstractDocumentQuery.cs:line 516
at Raven.Client.Document.AbstractDocumentQuery`2.GetEnumerator() in c:\code\ravendb\Raven.Client.Lightweight\Document\AbstractDocumentQuery.cs:line 741
at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
at Raven.Client.Linq.RavenQueryProviderProcessor`1.GetQueryResult[TProjection](IDocumentQuery`1 finalQuery) in c:\code\ravendb\Raven.Client.Lightweight\Linq\RavenQueryProviderProcessor.cs:line 1471
at Raven.Client.Linq.RavenQueryProviderProcessor`1.ExecuteQuery[TProjection]() in c:\code\ravendb\Raven.Client.Lightweight\Linq\RavenQueryProviderProcessor.cs:line 1379
at Raven.Client.Linq.RavenQueryProviderProcessor`1.Execute(Expression expression) in c:\code\ravendb\Raven.Client.Lightweight\Linq\RavenQueryProviderProcessor.cs:line 1354
at Raven.Client.Linq.RavenQueryProvider`1.Execute(Expression expression) in c:\code\ravendb\Raven.Client.Lightweight\Linq\RavenQueryProvider.cs:line 135
at Raven.Client.Linq.RavenQueryProvider`1.System.Linq.IQueryProvider.Execute[S](Expression expression) in c:\code\ravendb\Raven.Client.Lightweight\Linq\RavenQueryProvider.cs:line 178
at System.Linq.Queryable.Any[TSource](IQueryable`1 source)
at Raven.Tests.Spatial.SimonBartlett.GeohashIndexLevel7_LineStringShouldNotThrowException() in c:\code\ravendb\Raven.Tests\Spatial\SimonBartlett.cs:line 163