Index error in RC2

67 views
Skip to first unread message

Morten Christiansen

unread,
Dec 4, 2017, 2:41:33 PM12/4/17
to RavenDB - 2nd generation document database
Hi,

I'm experimenting with porting our 3.5 database to the new RC2 but I'm running into a bit of a problem with an index that used to work just fine. The index is trivially simple as is the data, so I'm quite puzzled. I've tried to boil it down to the essentials. The index (its the same with or without any field indexing specified:

from session in docs.SessionContents
select new {
    SessionId = Guid.NewGuid()
}


the data:

{
    "Content": "",
    "ContentEncoding": "utf8",
    "ContentType": null,
    "@metadata": {
        "@collection": "SessionContents",
        "Raven-Clr-Type": "UVAudit.Core.SessionContent, UVAudit.Core"
    }
}

The error:

Failed to execute mapping function on SessionContents/4d7b037a-d707-46fc-9b79-2167bee5a48b. Exception: System.InvalidCastException: Unable to cast object of type 'System.String' to type 'Sparrow.Json.Parsing.DynamicJsonValue'.
   at Raven.Server.Documents.Indexes.Persistence.Lucene.Documents.LuceneDocumentConverterBase.GetRegularFields[T](T instance, IndexField field, Object value, JsonOperationContext indexContext, Boolean nestedArray) in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Documents\Indexes\Persistence\Lucene\Documents\LuceneDocumentConverterBase.cs:line 346
   at Raven.Server.Documents.Indexes.Persistence.Lucene.Documents.AnonymousLuceneDocumentConverter.GetFields[T](T instance, LazyStringValue key, Object document, JsonOperationContext indexContext) in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Documents\Indexes\Persistence\Lucene\Documents\AnonymousLuceneDocumentConverter.cs:line 59
   at Raven.Server.Documents.Indexes.Persistence.Lucene.Documents.LuceneDocumentConverterBase.SetDocument(LazyStringValue key, Object document, JsonOperationContext indexContext, Boolean& shouldSkip) in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Documents\Indexes\Persistence\Lucene\Documents\LuceneDocumentConverterBase.cs:line 107
   at Raven.Server.Documents.Indexes.Persistence.Lucene.IndexWriteOperation.IndexDocument(LazyStringValue key, Object document, IndexingStatsScope stats, JsonOperationContext indexContext) in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Documents\Indexes\Persistence\Lucene\IndexWriteOperation.cs:line 104
   at Raven.Server.Documents.Indexes.MapIndexBase`2.HandleMap(LazyStringValue lowerId, IEnumerable mapResults, IndexWriteOperation writer, TransactionOperationContext indexContext, IndexingStatsScope stats) in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Documents\Indexes\MapIndexBase.cs:line 67
   at Raven.Server.Documents.Indexes.Workers.MapDocuments.Execute(DocumentsOperationContext databaseContext, TransactionOperationContext indexContext, Lazy`1 writeOperation, IndexingStatsScope stats, CancellationToken token) in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Documents\Indexes\Workers\MapDocuments.cs:line 110

The above error occurs for every document indexed and I have no clue what is supposed to be of this DynamicJsonValue type. I have tried deleting and recreating the index without luck. No other indexes are affected like this. I've inserted data from an export from the old data but without indexes which where instead created from running the new code. Hope someone can help me out.
I'm running the server RavenDB-4.0.0-rc-40023-windows-x64 on a 64 bit Windows 10 installation. The client is version 4.0.0-rc-40023.

Oren Eini (Ayende Rahien)

unread,
Dec 5, 2017, 6:52:09 AM12/5/17
to ravendb
Thanks, reproduced and we'll have a fix soon

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Morten Christiansen

unread,
Dec 12, 2017, 6:07:47 AM12/12/17
to RavenDB - 2nd generation document database
Should I expect the fix prior to the RTM version which I gather is coming some time this month?


To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.

Oren Eini (Ayende Rahien)

unread,
Dec 12, 2017, 6:16:10 AM12/12/17
to ravendb
This is already fixed in the nightlies, yes.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages