C# 클래스 Roadkill.Core.Services.SearchService

Provides searching tasks using a Lucene.net search index.
상속: ISearchService
파일 보기 프로젝트 열기: LocalGovDigital/pipeline 1 사용 예제들

공개 메소드들

메소드 설명
Add ( PageViewModel model ) : void

Adds the specified page to the search index.

CreateIndex ( ) : void

Creates the initial search index based on all pages in the system.

Delete ( PageViewModel model ) : int

Deletes the specified page from the search indexs.

Search ( string searchText ) : IEnumerable

Searches the lucene index with the search text.

Syntax reference: http://lucene.apache.org/java/2_3_2/queryparsersyntax.html#Wildcard

SearchService ( Roadkill.Core.Configuration.ApplicationSettings settings, IRepository repository, IPluginFactory pluginFactory ) : System
Update ( PageViewModel model ) : void

Updates the Page in the search index, by removing it and re-adding it.

비공개 메소드들

메소드 설명
EnsureDirectoryExists ( ) : void
GetContentSummary ( PageViewModel model ) : string

Converts the page summary to a lucene Document with the relevant searchable fields.

메소드 상세

Add() 공개 메소드

Adds the specified page to the search index.
An error occured with the lucene.net IndexWriter while adding the page to the index.
public Add ( PageViewModel model ) : void
model Roadkill.Core.Mvc.ViewModels.PageViewModel The page to add.
리턴 void

CreateIndex() 공개 메소드

Creates the initial search index based on all pages in the system.
An error occured with the lucene.net IndexWriter while adding the page to the index.
public CreateIndex ( ) : void
리턴 void

Delete() 공개 메소드

Deletes the specified page from the search indexs.
An error occured with the lucene.net IndexReader while deleting the page from the index.
public Delete ( PageViewModel model ) : int
model Roadkill.Core.Mvc.ViewModels.PageViewModel The page to remove.
리턴 int

Search() 공개 메소드

Searches the lucene index with the search text.
Syntax reference: http://lucene.apache.org/java/2_3_2/queryparsersyntax.html#Wildcard
An error occured searching the lucene.net index.
public Search ( string searchText ) : IEnumerable
searchText string The text to search with.
리턴 IEnumerable

SearchService() 공개 메소드

public SearchService ( Roadkill.Core.Configuration.ApplicationSettings settings, IRepository repository, IPluginFactory pluginFactory ) : System
settings Roadkill.Core.Configuration.ApplicationSettings
repository IRepository
pluginFactory IPluginFactory
리턴 System

Update() 공개 메소드

Updates the Page in the search index, by removing it and re-adding it.
An error occured with lucene.net while deleting the page or inserting it back into the index.
public Update ( PageViewModel model ) : void
model Roadkill.Core.Mvc.ViewModels.PageViewModel The page to update
리턴 void