Beispiel #1
0
        internal dynamic RunWordSearch()
        {
            Navigation_ADO adoNav = new Navigation_ADO(Ado);



            //Search based on the supplied keywords
            dynamic data = adoNav.Search(DTO);

            //Express the result of the keyword search as a list of objects
            List <RawSearchResult> rlistWordSearch = GetRawWordSearchResults(data);

            //Get a list of matrixes that fit the search exactly
            var exactMatches = GetExactMatches(rlistWordSearch, searchTermCount);

            //Get a list of matrixes that fit the search via synonyms
            var lemmaMatches = GetLemmaMatches(rlistWordSearch, searchTermCount);

            //Express all of the matrixes in a data table
            DataTable dt = GetResultDataTableWordSearch(exactMatches, lemmaMatches);

            //pass the datatable to the stored procedure to get the metadata associated with the matrix
            dynamic dataPlusMetadata = adoNav.ReadSearchResults(dt, DTO.LngIsoCode);

            //Format the result as a json response
            return(FormatOutput(dataPlusMetadata, DTO.LngIsoCode));
        }
Beispiel #2
0
        internal dynamic RunEntitySearch()
        {
            Navigation_ADO adoNav = new Navigation_ADO(Ado);
            //Search based on entities named in the DTO
            dynamic entityData = adoNav.EntitySearch(DTO);
            List <RawSearchResult> rEntities = GetRawWordSearchResults(entityData);

            DataTable dt = GetResultDataTableEntitySearch(rEntities);

            //pass the datatable to the stored procedure to get the metadata associated with the matrix
            dynamic dataV2 = adoNav.ReadSearchResults(dt, DTO.LngIsoCode);

            //Format the result as a json response
            return(FormatOutput(dataV2, DTO.LngIsoCode));
        }