Пример #1
0
        public SolrQueryResponseBuilder(string rawSolrQueryResponse)
        {
            SolrQueryResponse = JsonConvert.DeserializeObject <SolrQueryResponse>(rawSolrQueryResponse);

            SolrQueryResponse.Debug.ExplainModels     = BuildExplainModels(SolrQueryResponse.Debug.explain);
            SolrQueryResponse.Response.DocumentModels = BuildDocumentModels(SolrQueryResponse.Response.Docs);
        }
Пример #2
0
        public ExplainComparisonViewModel(SolrQueryResponse solrQueryResponse, int documentOneIndex, int documentTwoIndex)
        {
            DocumentModelOne = solrQueryResponse.Response.DocumentModels.ToList()[documentOneIndex];
            ExplainModelOne  = solrQueryResponse.Debug.ExplainModels.ToList()[documentOneIndex];
            DocumentModelTwo = solrQueryResponse.Response.DocumentModels.ToList()[documentTwoIndex];
            ExplainModelTwo  = solrQueryResponse.Debug.ExplainModels.ToList()[documentTwoIndex];

            // Setup combinedFieldList
            CombinedFieldQueryList = BuildCombinedFieldList();

            // Setup chart data
            RadarChartLabels      = BuildChartLabels();
            RadarChartDatasetList = BuildChartDatasetList();
        }
 public ExplainViewModel(string guid, SolrQueryResponse solrQueryResponse)
 {
     Guid = guid;
     SolrQueryResponse            = solrQueryResponse;
     ComparisonDocumentSelectList = GetComparisonDocumentSelectList(SolrQueryResponse.Debug.ExplainModels);
 }