企业搜索

搜索:
ESIndexPost : IndexPost
EnterpriseSearchProvider :SearchProvider
ESSearchResultSet : SearchResultSet

IndexServer
ESearch

------------------------------

建立索引:

job:定时建立索引
SearchJob : IJob
FilesIndexTask(ForumsIndexTask|GalleryIndexTask|WeblogIndexTask|ContentIndexTask):IndexTask


Module:某些事件发生时建立索引
SearchModule : ICSModule

----------------------------
Lucene.Net:

Document:
SearchableFileDocument(SearchableForumsDocument|SearchableGalleryDocument|SearchableWeblogDocument):SearchableDocument
Fields:




CREATE PROCEDURE [dbo].[cs_Posts_ReindexBySection] 

 @SectionID int, 
 @SettingsID int 

AS 
 --this proc intentionally renames all posts across all settingsids by that user 
 
 
 -- first, set the post to be removed from the index 
 INSERT cs_es_Search_RemoveQueue (PostID, SettingsID)  
 SELECT P.PostID, P.SettingsID  
 FROM cs_Posts P  
 WHERE P.SectionID = @SectionID AND P.SettingsID = @SettingsID 
 AND PostID NOT IN (SELECT PostID FROM cs_es_Search_RemoveQueue) 
 
 -- step 2, add post to reindex table 
 UPDATE cs_Posts set IsIndexed = 0  
 FROM cs_Posts P  
 WHERE P.SectionID = @SectionID AND P.SettingsID = @SettingsID 

posted @ 2006-11-15 14:31  烈马狂生  阅读(267)  评论(1编辑  收藏  举报