My elasticsearch is giving this error 'The type initializer for 'PerTypeValues`1' threw an exception'
the code is
CustomLogWrite.WriteLog("Viewed canidates Inside ");
UpdateByQueryResponse resp = Client.UpdateByQuery<CandidateInfoEs>(s => s
.Query(q => q.Terms(c => c.Field(p => p.RCandidateId).Terms(CandidatesID)))
.Script(script => script
.Source("if (ctx._source.ViewedFromPositions == null) { ctx._source.ViewedFromPositions = new ArrayList(); } ctx._source.ViewedFromPositions.add(params.id);")
.Params(p => p.Add("id", positionID)))
.Conflicts(Conflicts.Proceed)
.Refresh(true)
);