コード例 #1
0
        public void IndexTitle(long titleId)
        {
            DataManager            da = new DataManager();
            List <IndexableEntity> subtitleTextCollection = da.SubtitlesTextGetByTitleId(titleId);

            if (subtitleTextCollection != null)
            {
                IndexMiner.AddUpdateLuceneIndex(subtitleTextCollection);
            }

            da.TitlesIndexStatusUpdate(titleId, "Indexed");
        }
コード例 #2
0
        public void ParseAndReIndexAll()
        {
            DataManager  da        = new DataManager();
            List <Title> allTitles = da.TitlesGetAll();

            if (allTitles != null)
            {
                IndexMiner.ClearLuceneIndex();

                foreach (Title t in allTitles)
                {
                    ParseTitle(t.Id);
                    IndexTitle(t.Id);
                }
            }
        }
コード例 #3
0
        public List <IndexableEntity> Search(Dictionary <string, string> searchTerms, string userId = "")
        {
            IEnumerable <IndexableEntity> searchedData = IndexMiner.SearchByMultipleFields(searchTerms);

            return(LoadActualDataForIndexSearchResult(searchedData, userId));
        }
コード例 #4
0
        public List <IndexableEntity> Search(string criteria, string filmName = "", string userId = "")
        {
            IEnumerable <IndexableEntity> searchedData = IndexMiner.Search(criteria, filmName);

            return(LoadActualDataForIndexSearchResult(searchedData));
        }