Class UnifiedSearchHit
A class that describes a hit returned from UnifiedSearchQuery.
Inheritance
System.Object
UnifiedSearchHit
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: 8.11.0Syntax
public class UnifiedSearchHit
Constructors
UnifiedSearchHit(String, Int32, String, String)
Creates a new search hit.
Declaration
public UnifiedSearchHit(string path, int rank, string name, string preview)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Path to the file that was found. |
System.Int32 | rank | Rank of the file hit. |
System.String | name | Name of the file. |
System.String | preview | A preview of the file contents if such a preview can be generated. |
Properties
Name
Name of the file.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Path
Path to the file that was found.
Declaration
public string Path { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Preview
A preview of the file contents.
Declaration
public string Preview { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
Note that this string may be null or String.Empty - not all file systems supports a preview of the file contents.
Rank
Rank of the file hit.
Declaration
public int Rank { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
The rank should only be viewed as a relative measure compared to other ranks in the same UnifiedSearchHitCollection The larger the rank, the better the hit.