企业搜索

搜索:
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 

0
0
(请您对文章做出评价)
« 上一篇:ASP.NET 2.0的缓存技术简介『转』
» 下一篇:条件编译
posted @ 2006-11-15 14:31 烈马狂生 阅读(56) 评论(1)  编辑 收藏 所属分类: CommunityServer

  回复  引用    
#1楼2007-01-22 15:27 | 萨阿嫂飒飒[未注册用户]
a as
@SectionID int,
@SettingsID int
)
AS
--this proc intentionally renames all posts across all settingsids by that user


-- fir P

-- first, set the post to be removed from the index
INSERT cs_es_Search_RemoveQueue st, set the post to be removed from the index
INSERT cs_es_Search_RemoveQueue (PostID, SettingsID)
SELECT P.PostID, P.SettingsID
FROM cs_= @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
WHERE P.SectionID = @SectionID AND P.SettingsID = @SettingsID
AND PostID NOT IN (SEPosts(PostID, SettingsID)
SELECT P.PostID, P.SettingsID
FROM cs_Posts P
WHERE P.SectionID LECT PostID FROM cs_es_Search_RPosts set IsIndexed emoveQueue)
@SectionID AND P.SettingsID = @SettingsID


-- step 2, add post to reindex table
UPDATE cs_= 0
FROM cs_Posts P
WHERE P.SectionID =