Beispiel #1
0
        public override IEnumerable <ELModels.SearchResultFilterData> returnSportResult(ElasticClient EsClient, QueryContainer _objNestedQuery, string IndexName)
        {
            EsClient = oLayer.CreateConnection();
            searchcricket sc = new searchcricket();
            IEnumerable <SearchResultFilterData> _objSearchResultFilterData = new List <SearchResultFilterData>();
            var result = EsClient.Search <SearchCricketData>(s => s.Index(IndexName).Query(q => _objNestedQuery).Sort(q => q.Ascending(u => u.Id.Suffix("keyword"))).Size(802407));

            _objSearchResultFilterData = SearchResultFilterDataMap(result);
            return(_objSearchResultFilterData);
        }
        public IEnumerable <SearchCricketResultData> returnSportResult(ElasticClient EsClient, QueryContainer _objNestedQuery, string IndexName)
        {
            List <SearchCricketResultData> Final_result = new List <SearchCricketResultData>();

            EsClient = oLayer.CreateConnection();
            searchcricket sc = new searchcricket();

            var result = EsClient.Search <SearchCricketData>(s => s.Index(IndexName).Query(q => _objNestedQuery).Size(409846));

            //Final_result = SearchResultFilterDataMap(result);
            return(Final_result);
        }