Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

171
Vistas
Í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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda