SaaS CMS has officially launched! Learn more now.

Class VersioningFileSystemSearchHandler

Handles updates to the search index for the versioning file system items.

Inheritance
System.Object
VersioningFileSystemSearchHandler
Implements
EPiServer.Search.IReIndexable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web.Hosting
Assembly: EPiServer.dll
Version: 7.19.2
Syntax
public class VersioningFileSystemSearchHandler : IReIndexable

Constructors

VersioningFileSystemSearchHandler(SearchHandler, IHostingEnvironment, SearchIndexConfig)

Initializes a new instance of the VersioningFileSystemSearchHandler class.

Declaration
public VersioningFileSystemSearchHandler(SearchHandler searchHandler, IHostingEnvironment hostingEnvironment, SearchIndexConfig searchIndexConfig)
Parameters
Type Name Description
EPiServer.Search.SearchHandler searchHandler

The search handler.

IHostingEnvironment hostingEnvironment

The hosting environment.

SearchIndexConfig searchIndexConfig

The search index config.

Fields

UnifiedDirectoryItemType

The ItemType that is used for UnifiedDirectory entries in the search index

Declaration
public static readonly string UnifiedDirectoryItemType
Field Value
Type Description
System.String

UnifiedFileItemType

The ItemType that is used for UnifiedFile entries in the search index

Declaration
public static readonly string UnifiedFileItemType
Field Value
Type Description
System.String

Properties

NamedIndex

Gets the index of the named.

Declaration
public string NamedIndex { get; }
Property Value
Type Description
System.String

NamedIndexingService

Gets the named indexing service.

Declaration
public string NamedIndexingService { get; }
Property Value
Type Description
System.String

ServiceActive

Gets or sets a value indicating whether the search service is active.

Declaration
public virtual bool ServiceActive { get; set; }
Property Value
Type Description
System.Boolean

true if search service is active; otherwise, false.

Remarks

This value will be initialized from the configuration settings of EPiServer.Search.

Methods

CreateInstance(SearchHandler, IHostingEnvironment, SearchIndexConfig)

Creates a new initialized instance of the search index.

Declaration
public static VersioningFileSystemSearchHandler CreateInstance(SearchHandler searchHandler, IHostingEnvironment hostingEnvironment, SearchIndexConfig searchIndexConfig)
Parameters
Type Name Description
EPiServer.Search.SearchHandler searchHandler

The search handler.

IHostingEnvironment hostingEnvironment

The hosting environment.

SearchIndexConfig searchIndexConfig

The search index config.

Returns
Type Description
VersioningFileSystemSearchHandler

A new ContentSearchHandler instance.

GetVirtualPathNodes(VersioningDirectory)

Gets the virtual path nodes of the provided directory.

Declaration
public static IEnumerable<string> GetVirtualPathNodes(VersioningDirectory directory)
Parameters
Type Name Description
VersioningDirectory directory

The directory.

Returns
Type Description
System.Collections.Generic.IEnumerable<System.String>

A list of the virtual path nodes of the provided directory.

GetVirtualPathNodes(VersioningFile)

Gets the virtual path nodes of the provided file.

Declaration
public static IEnumerable<string> GetVirtualPathNodes(VersioningFile file)
Parameters
Type Name Description
VersioningFile file

The file.

Returns
Type Description
System.Collections.Generic.IEnumerable<System.String>

A list of the virtual path nodes of the provided file.

IndexAll()

Indexes all files and directories in the virtual path providers.

Declaration
public virtual void IndexAll()

IndexItemsRecursively(VersioningDirectory)

Indexes the files in the specified directory, as well as all child directories.

Declaration
public void IndexItemsRecursively(VersioningDirectory directory)
Parameters
Type Name Description
VersioningDirectory directory

The directory to index files in.

IndexItemsRecursively(String)

Indexes the files in the specified directory, as well as all child directories.

Declaration
public void IndexItemsRecursively(string virtualPath)
Parameters
Type Name Description
System.String virtualPath

The virtual path to the directory to index files in.

ReIndex()

Re-Index.

Declaration
public void ReIndex()

RemoveDirectory(VersioningDirectory)

Removes a directory from the search index.

Declaration
public void RemoveDirectory(VersioningDirectory directory)
Parameters
Type Name Description
VersioningDirectory directory

The directory that should be removed from the index.

RemoveFile(VersioningFile)

Removes a file from the search index.

Declaration
public virtual void RemoveFile(VersioningFile file)
Parameters
Type Name Description
VersioningFile file

The file that should be removed from the index.

UpdateDirectory(VersioningDirectory)

Updates the search index representation of the provided directory.

Declaration
public virtual void UpdateDirectory(VersioningDirectory directory)
Parameters
Type Name Description
VersioningDirectory directory

The directory that should be updated in the index.

UpdateDirectory(String)

Updates the search index representation of the provided directory.

Declaration
public void UpdateDirectory(string virtualPath)
Parameters
Type Name Description
System.String virtualPath

The virtual path to the directory that should be updated in the index.

UpdateFile(VersioningFile)

Updates the search index representation of the provided file.

Declaration
public virtual void UpdateFile(VersioningFile file)
Parameters
Type Name Description
VersioningFile file

The file that should be updated in the index.

UpdateFile(String)

Updates the search index representation of the file with the provided virtual path.

Declaration
public virtual void UpdateFile(string virtualPath)
Parameters
Type Name Description
System.String virtualPath

The virtual path to the file that should be updated in the index.

Implements

EPiServer.Search.IReIndexable

Extension Methods