Class ExamineExtensions
Extension methods for the LuceneIndex
Inheritance
Namespace: Umbraco.Extensions
Assembly: Umbraco.Examine.Lucene.dll
Syntax
public static class ExamineExtensions
Methods
View SourceIsHealthy(LuceneIndex, out Exception)
Checks if the index can be read/opened
Declaration
public static bool IsHealthy(this LuceneIndex indexer, out Exception ex)
Parameters
| Type | Name | Description |
|---|---|---|
| LuceneIndex | indexer | |
| Exception | ex | The exception returned if there was an error |
Returns
| Type | Description |
|---|---|
| bool |
ToPublishedSearchResults(IEnumerable<ISearchResult>, ICacheManager)
Creates an System.Collections.Generic.IEnumerable<T> containing all content, media or members from the snapshot.
Declaration
public static IEnumerable<PublishedSearchResult> ToPublishedSearchResults(this IEnumerable<ISearchResult> results, ICacheManager cacheManager)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<ISearchResult> | results | The search results. |
| ICacheManager | cacheManager | The caches. |
Returns
| Type | Description |
|---|---|
| IEnumerable<PublishedSearchResult> | An System.Collections.Generic.IEnumerable<T> containing all content, media or members. |
Remarks
Search results are skipped if it can't be fetched from the respective cache by its integer id.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | snapshot |
ToPublishedSearchResults(IEnumerable<ISearchResult>, IPublishedCache?)
Creates an System.Collections.Generic.IEnumerable<T> containing all content from the
cache.
Declaration
public static IEnumerable<PublishedSearchResult> ToPublishedSearchResults(this IEnumerable<ISearchResult> results, IPublishedCache? cache)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<ISearchResult> | results | The search results. |
| IPublishedCache | cache | The cache to fetch the content from. |
Returns
| Type | Description |
|---|---|
| IEnumerable<PublishedSearchResult> | An System.Collections.Generic.IEnumerable<T> containing all content. |
Remarks
Search results are skipped if it can't be fetched from the cache by its integer id.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | cache |