Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

165
Views
Índice de RavenDB: el campo de instancia 'flags' no está definido para el tipo 'System.Decimal'

RavenDB Index falla cuando uso propiedades decimales y no puedo entender por qué.

Mi índice:

 public class MyIndex : AbstractIndexCreationTask<MyDocument> { public class Result { public string Id { get; set; } = string.Empty; public decimal? PreviousPrice { get; set; } public decimal? CurrentPrice { get; set; } } public NavEntriesIndex() { Map = entries => from entry in entries select new Result { Id = entry.Id, PreviousPrice = entry.PreviousPriceMovement.Price, CurrentPrice = entry.PriceMovement.Price, }; StoreAllFields(FieldStorage.Yes); } }

El error:

No se pudo ejecutar la función de mapeo en 7cb4e8c7-2807-4dd2-9b42-98938acfa11f. Excepción: System.TypeInitializationException: el inicializador de tipo para 'Sparrow.Utils.DecimalHelper' generó una excepción.

---> System.ArgumentException: el campo de instancia 'flags' no está definido para el tipo 'System.Decimal'

en System.Linq.Expressions.Expression.Field(Expression expression, String fieldName)

en Sparrow.Utils.DecimalHelper.CreateIsDoubleMethod() en C:\Builds\RavenDB-Stable-4.2\42046\src\Sparrow\Utils\DecimalHelper.cs:line 25

en Sparrow.Utils.DecimalHelper..ctor() en C:\Builds\RavenDB-Stable-4.2\42046\src\Sparrow\Utils\DecimalHelper.cs:line 18

en Sparrow.Utils.DecimalHelper..cctor() en C:\Builds\RavenDB-Stable-4.2\42046\src\Sparrow\Utils\DecimalHelper.cs:line 12

--- Fin del seguimiento de la pila de excepción interna ---

en Raven.Server.Json.BlittableNumber.Parse(Object value, Double& doubleResult, Int64& longResult) en C:\Builds\RavenDB-Stable-4.2\42046\src\Raven.Server\Json\BlittableNumber.cs:line 55

en Raven.Server.Documents.Indexes.Persistence.Lucene.Documents.LuceneDocumentConverterBase.GetOrCreateNumericField(campo IndexField, valor de objeto, almacenamiento de almacenamiento, TermVector termVector)+MoveNext() en C:\Builds\RavenDB-Stable-4.2\42046\src \Raven.Server\Documentos\Índices\Persistencia\Lucene\Documentos\LuceneDocumentConverterBase.cs:línea 595

en Raven.Server.Documents.Indexes.Persistence.Lucene.Documents.LuceneDocumentConverterBase.GetRegularFields[T](instancia T, campo IndexField, valor de objeto, JsonOperationContext indexContext, Boolean& shouldSkip, Boolean nestedArray) en C:\Builds\RavenDB-Stable- 4.2\42046\src\Raven.Server\Documentos\Indexes\Persistencia\Lucene\Documentos\LuceneDocumentConverterBase.cs:línea 408

en Raven.Server.Documents.Indexes.Persistence.Lucene.Documents.AnonymousLuceneDocumentConverter.GetFields[T](T instancia, LazyStringValue key, Object document, JsonOperationContext indexContext, IWriteOperationBuffer writeBuffer) en C:\Builds\RavenDB-Stable-4.2\42046 \src\Raven.Server\Documentos\Índices\Persistencia\Lucene\Documentos\AnónimoLuceneDocumentConverter.cs:línea 57

en Raven.Server.Documents.Indexes.Persistence.Lucene.Documents.LuceneDocumentConverterBase.SetDocument(LazyStringValue key, Object document, JsonOperationContext indexContext, IWriteOperationBuffer writeBuffer, Boolean& shouldSkip) en C:\Builds\RavenDB-Stable-4.2\42046\src\ Raven.Server\Documentos\Índices\Persistencia\Lucene\Documentos\LuceneDocumentConverterBase.cs:línea 105

en Raven.Server.Documents.Indexes.Persistence.Lucene.IndexWriteOperation.IndexDocument(LazyStringValue key, Object document, IndexingStatsScope stats, JsonOperationContext indexContext) en C:\Builds\RavenDB-Stable-4.2\42046\src\Raven.Server\Documents \Índices\Persistencia\Lucene\IndexWriteOperation.cs:línea 127

en Raven.Server.Documents.Indexes.MapIndexBase`2.HandleMap(LazyStringValue lowerId, LazyStringValue id, IEnumerable mapResults, IndexWriteOperation escritor, TransactionOperationContext indexContext, IndexingStatsScope stats) en C:\Builds\RavenDB-Stable-4.2\42046\src\Raven .Servidor\Documentos\Índices\MapIndexBase.cs:línea 68

en Raven.Server.Documents.Indexes.Workers.MapDocuments.Execute(DocumentsOperationContext databaseContext, TransactionOperationContext indexContext, Lazy`1 writeOperation, IndexingStatsScope stats, CancellationToken token) en C:\Builds\RavenDB-Stable-4.2\42046\src\Raven. Servidor\Documentos\Índices\Trabajadores\MapDocuments.cs:línea 107

¿Alguna idea?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!