<commit_before>﻿using System.Collections.Generic;
using System.Linq;

namespace PlainElastic.Net.Serialization
{
    public class SearchResult<T> : BaseResult
    {
        public int took;
        public bool timed_out;
        public ShardsResult _shards;
        public Hits hits;
        public Facets facets;
        
        public IEnumerable<T> Documents
        {
            get { return hits.hits.Select(hit => hit._source); }
        }


        public class Hits
        {
            public int total;
            public double ?max_score;
            public Hit[] hits;
        }

        public class Hit
        {
            public string _index;
            public string _type;
            public string _id;
            public double _score;
            public T _source;
        }<commit_msg>added sort field to hit result<commit_after>﻿using System.Collections.Generic;
using System.Linq;

namespace PlainElastic.Net.Serialization
{
    public class SearchResult<T> : BaseResult
    {
        public int took;
        public bool timed_out;
        public ShardsResult _shards;
        public Hits hits;
        public Facets facets;
        
        public IEnumerable<T> Documents
        {
            get { return hits.hits.Select(hit => hit._source); }
        }


        public class Hits
        {
            public int total;
            public double ?max_score;
            public Hit[] hits;
        }

        public class Hit
        {
            public string _index;
            public string _type;
            public string _id;
            public double _score;
            public dynamic[] sort;
            public T _source;
        }
{'fraction_non_alphanumeric': 0.06130952380952381, 'fraction_numerical': 0.0, 'mean_word_length': 1.5278195488721804, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3630394', 'n_tokens_mistral': 433, 'n_tokens_neox': 421, 'n_words': 132}