public void WriteJson(ElasticsearchCrudJsonWriter elasticsearchCrudJsonWriter) { elasticsearchCrudJsonWriter.JsonWriter.WritePropertyName("nested"); elasticsearchCrudJsonWriter.JsonWriter.WriteStartObject(); JsonHelper.WriteValue("path", _path, elasticsearchCrudJsonWriter); elasticsearchCrudJsonWriter.JsonWriter.WritePropertyName("query"); elasticsearchCrudJsonWriter.JsonWriter.WriteStartObject(); _query.WriteJson(elasticsearchCrudJsonWriter); elasticsearchCrudJsonWriter.JsonWriter.WriteEndObject(); JsonHelper.WriteValue("score_mode", _scoreMode.ToString(), elasticsearchCrudJsonWriter, _scoreModeSet); elasticsearchCrudJsonWriter.JsonWriter.WriteEndObject(); }
public void WriteJson(ElasticsearchCrudJsonWriter elasticsearchCrudJsonWriter) { elasticsearchCrudJsonWriter.JsonWriter.WritePropertyName("has_child"); elasticsearchCrudJsonWriter.JsonWriter.WriteStartObject(); JsonHelper.WriteValue("type", _type, elasticsearchCrudJsonWriter); elasticsearchCrudJsonWriter.JsonWriter.WritePropertyName("query"); elasticsearchCrudJsonWriter.JsonWriter.WriteStartObject(); _query.WriteJson(elasticsearchCrudJsonWriter); elasticsearchCrudJsonWriter.JsonWriter.WriteEndObject(); JsonHelper.WriteValue("min_children", _minChildren, elasticsearchCrudJsonWriter, _minChildrenSet); JsonHelper.WriteValue("max_children", _maxChildren, elasticsearchCrudJsonWriter, _maxChildrenSet); JsonHelper.WriteValue("score_mode", _scoreMode.ToString(), elasticsearchCrudJsonWriter, _scoreModeSet); elasticsearchCrudJsonWriter.JsonWriter.WriteEndObject(); }