This content is archived. See latest version here


The .NET API uses JSON.NET to serialize objects that are to be indexed. When using the Client class some customizations are automatically made to the serialization but further customization is possible. By customizing how objects are serialized it is possible to include additional fields, exclude fields, handle how fields are serialized and so on.

Customization can be done in two ways, using attributes and by customizing the conventions used by the Client. Attributes enable us to quickly apply common customizations to classes that we can modify. The conventions on the other hand enable us to do very powerfull customizations (such as customizing multiple classes at the same time and including return values from extension methods) without having to modify the the classes of the objects being serialized.

Last updated: Sep 26, 2013