Getting error 'The type initializer for 'PerTypeValues`1' threw an exception'

2.1k Views Asked by At

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)
                            );
0

There are 0 best solutions below