Beispiel #1
0
        /// <summary>
        /// 搜索酒店信息
        /// </summary>
        /// <param name="paras">搜索参数列表</param>
        /// <returns>List{System.String}.</returns>
        public List <string> SearchHotel(List <QueryParameter> paras)
        {
            string        luceneSql    = GetLuceneSql(paras);
            List <string> hotelIDs     = new List <string>();
            IndexLibrary  indexManager = new IndexLibrary();

            hotelIDs.AddRange(indexManager.IndexDocQuery(luceneSql));
            return(hotelIDs);
        }
Beispiel #2
0
        public static void Main(string[] args)
        {
            // 初始化索引器
            IndexLibrary indexLibrary = new IndexLibrary();
            var          result       = indexLibrary.GenerationIndex();

            SearchEngine searchEngine = new SearchEngine();
            var          ids          = searchEngine.SearchHotel("速8");
        }