Class SearchResult
- Namespace
- Examine
- Assembly
- Examine.Core.dll
Represents a search result
public class SearchResult : ISearchResult
- Inheritance
-
SearchResult
- Implements
- Derived
- Inherited Members
Constructors
SearchResult(string, float, Func<IDictionary<string, List<string>>>)
Constructor
public SearchResult(string id, float score, Func<IDictionary<string, List<string>>> lazyFieldVals)
Parameters
Properties
AllValues
Returns the values in the result
public IReadOnlyDictionary<string, IReadOnlyList<string>> AllValues { get; }
Property Value
Remarks
This is used to retrieve multiple values per field if there are any
Id
The id of the search result
public string Id { get; }
Property Value
this[int]
Returns the key value pair for the index specified
public KeyValuePair<string, string> this[int resultIndex] { get; }
Parameters
resultIndex
int
Property Value
this[string]
Returns the value for the key specified
public string? this[string key] { get; }
Parameters
key
string
Property Value
Score
The score of the search result
public float Score { get; }
Property Value
Values
Returns the values in the result
public IReadOnlyDictionary<string, string> Values { get; }
Property Value
Methods
Equals(object?)
Override this method so that the Distinct() operator works
public override bool Equals(object? obj)
Parameters
obj
object
Returns
GetHashCode()
Override this method so that the Distinct() operator works
public override int GetHashCode()
Returns
GetValues(string)
If a single field was indexed with multiple values this will return those values, otherwise it will just return the single value stored for that field. If the field is not found it returns an empty collection.
public IEnumerable<string> GetValues(string key)
Parameters
key
string