Exemplo n.º 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));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Execute
        /// </summary>
        /// <returns></returns>
        protected override bool Execute()
        {
            Navigation_ADO adoNav = new Navigation_ADO(Ado);

            dynamic data = adoNav.Search(DTO);

            Response.data = FormatOutput(data, DTO.LngIsoCode);

            return(true);
        }