﻿using System;
using System.Collections.Generic;
using System.Diagnostics;

namespace NElasticsearch.Models
{
    /// <summary>
    /// Individual hit response from ElasticSearch.
    /// </summary>
    [DebuggerDisplay("{_type} in {_index} id {_id}")]
    public class Hit<T>
    {
        public string _index { get; set; }
        public string _type { get; set; }
        public string _id { get; set; }
        public double? _score { get; set; }

        public T _source { get; set; }
        //public Dictionary<String, JToken> fields = new Dictionary<string, JToken>();
    }
}

﻿using System.Collections.Generic;
using System.Diagnostics;

namespace NElasticsearch.Models
{
    /// <summary>
    /// Individual hit response from ElasticSearch.
    /// </summary>
    [DebuggerDisplay("{_type} in {_index} id {_id}")]
    public class Hit<T>
    {
        public string _index { get; set; }
        public string _type { get; set; }
        public string _id { get; set; }
        public double? _score { get; set; }

        public T _source { get; set; }
        public Dictionary<string, IEnumerable<object>> fields = new Dictionary<string, IEnumerable<object>>();

        public Dictionary<string, IEnumerable<string>> highlight;
    }
}

Support fields and highlights in responses
Support fields and highlights in responses
