I would like to manually serialize an object to a string and index it by using PlainElastic.net. I tried the followed:
Disk myDisk = Disks[1]; // Gets a Disk object from a dictionary
string command = Commands.Index("Album", "Music", myDisk.Id.ToString());
string json = "\"query\":{\"disk\": {\"album_id\":\"" + myDisk.albumId + "\",\"disk_id\":\"" + myDisk.Id + "\"}}";
OperationResult response = connection.Put(command, json);
However, I get an exception:
"The remote server returned an error: (400) Bad Request." Afterwards, I get the following exception: {"error":"MapperParsingException[Malformed content, must start with an object]","status":400}
Does anyone know how I should perform the indexing manually?
Thank you in advance.