Nest 6.2.0 Self Referencing Loop
NickName:Conor Malcolm Ask DateTime:2018-08-09T22:17:54

Nest 6.2.0 Self Referencing Loop

I am using Nest v6.2.0 to connect to elastic search.

When I am trying to add a document of type A to an index I get a Self Referencing loop error because the object of type A has a property of type B and type B has a property of type A. Both objects of type A & B are database objects.

I can set the ReferenceLoopHandling setting to ReferenceLoopHandling.Ignore on a JsonParser and it can parse the object fine, but I can't seem to send that json string to elastic search. So how can I set the same setting on the Json Parser used by Nest? SO that I can send the object to elastic search and Nest can correctly parse the object without the self referencing loop error.

Copyright Notice:Content Author:「Conor Malcolm」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/51769409/nest-6-2-0-self-referencing-loop

More about “Nest 6.2.0 Self Referencing Loop” related questions

Nest 6.2.0 Self Referencing Loop

I am using Nest v6.2.0 to connect to elastic search. When I am trying to add a document of type A to an index I get a Self Referencing loop error because the object of type A has a property of ty...

Show Detail

Elastic Search NEST Self referencing loop detected for property

Using version 2.0.2 I just cannot find where to set the serializer settings for the Nest.JsonNetSerializer to avoid Self referencing loop detected exception. And i guess that the documentation is ...

Show Detail

Custom JsonConverter self referencing loop

Is there a way I can create my own Custom JsonConverter, which modifies the data before writing out the Json, that works with a nested parent-child structure? Whenever I try at the moment, I end up...

Show Detail

Self referencing loop detected

I have read a lot of previous solutions for this problem but none worked for me. I have a circular relation between Event and User object: public class Event : EntityData { [Required] [

Show Detail

JSON Self referencing loop explanation

I am doing some work with C#, AJAX and JSON and am getting a Self referencing loop error. I am managing to get around this using the JsonIgnore attribute, but I was wondering if someone can give me a

Show Detail

Modify serializersettings for Nest and Elastic Search

I'm trying to change how Newtonsoft handles self referencing loops when using Nest to serialize an object. I'm using Newtonsoft.Json 4.5.11 and I'm stuck with that version, Nest is version 0.11.7.0...

Show Detail

Next self referencing loop json

When signalr sends a response to the client sometimes there is a self referencing loop. How can I fix this in MVC5? In a normal ASP.NET mvc 5 project I used: config.Formatters.JsonFormatter.

Show Detail

Self-referencing loop error

I have a self referencing loop. I tried reading and implementing some of the other answers but it does not seem to work. I have a class that saves my object as a json file (method). It attempts to

Show Detail

Serialization error with Elasticsearch NEST/C#

I'm using NEST to index my objects and I'm running into a Newtonsoft error on serialization. One of my objects has a self referencing loop. Would there be a way for me to access the JsonSerializer ...

Show Detail

Detect self-referencing ellipses [...] and replace with a string

When you create a self-referencing nest such as discussed in the question below, you end up with [...] representing infinite loops upon calling print. Aside from converting the nest into a string and

Show Detail