View Source
Class PublishedContentQuery
A class used to query for published content, media items
Assembly: Umbraco.Infrastructure.dll
Syntax
public class PublishedContentQuery : IPublishedContentQuery
Constructors
View Source
PublishedContentQuery(IVariationContextAccessor, IExamineManager, IPublishedContentCache, IPublishedMediaCache)
Declaration
[Obsolete("Scheduled for removal in Umbraco 18")]
public PublishedContentQuery(IVariationContextAccessor variationContextAccessor, IExamineManager examineManager, IPublishedContentCache publishedContent, IPublishedMediaCache publishedMediaCache)
Parameters
View Source
PublishedContentQuery(IVariationContextAccessor, IExamineManager, IPublishedContentCache, IPublishedMediaCache, IDocumentNavigationQueryService)
Declaration
public PublishedContentQuery(IVariationContextAccessor variationContextAccessor, IExamineManager examineManager, IPublishedContentCache publishedContent, IPublishedMediaCache publishedMediaCache, IDocumentNavigationQueryService documentNavigationQueryService)
Parameters
Methods
View Source
Content(IEnumerable<Guid>)
Declaration
public IEnumerable<IPublishedContent> Content(IEnumerable<Guid> ids)
Parameters
| Type |
Name |
Description |
| IEnumerable<Guid> |
ids |
|
Returns
View Source
Content(IEnumerable<int>)
Declaration
public IEnumerable<IPublishedContent> Content(IEnumerable<int> ids)
Parameters
| Type |
Name |
Description |
| IEnumerable<int> |
ids |
|
Returns
View Source
Content(IEnumerable<object>)
Declaration
public IEnumerable<IPublishedContent> Content(IEnumerable<object> ids)
Parameters
| Type |
Name |
Description |
| IEnumerable<object> |
ids |
|
Returns
View Source
Content(Guid)
Declaration
public IPublishedContent? Content(Guid id)
Parameters
| Type |
Name |
Description |
| Guid |
id |
|
Returns
View Source
Content(int)
Declaration
public IPublishedContent? Content(int id)
Parameters
| Type |
Name |
Description |
| int |
id |
|
Returns
View Source
Content(object)
Declaration
public IPublishedContent? Content(object id)
Parameters
| Type |
Name |
Description |
| object |
id |
|
Returns
View Source
Content(Udi?)
Declaration
public IPublishedContent? Content(Udi? id)
Parameters
| Type |
Name |
Description |
| Udi |
id |
|
Returns
View Source
ContentAtRoot()
Declaration
public IEnumerable<IPublishedContent> ContentAtRoot()
Returns
View Source
Media(IEnumerable<Guid>)
Declaration
public IEnumerable<IPublishedContent> Media(IEnumerable<Guid> ids)
Parameters
| Type |
Name |
Description |
| IEnumerable<Guid> |
ids |
|
Returns
View Source
Media(IEnumerable<int>)
Declaration
public IEnumerable<IPublishedContent> Media(IEnumerable<int> ids)
Parameters
| Type |
Name |
Description |
| IEnumerable<int> |
ids |
|
Returns
View Source
Media(IEnumerable<object>)
Declaration
public IEnumerable<IPublishedContent> Media(IEnumerable<object> ids)
Parameters
| Type |
Name |
Description |
| IEnumerable<object> |
ids |
|
Returns
View Source
Media(Guid)
Declaration
public IPublishedContent? Media(Guid id)
Parameters
| Type |
Name |
Description |
| Guid |
id |
|
Returns
View Source
Media(int)
Declaration
public IPublishedContent? Media(int id)
Parameters
| Type |
Name |
Description |
| int |
id |
|
Returns
View Source
Media(object)
Declaration
public IPublishedContent? Media(object id)
Parameters
| Type |
Name |
Description |
| object |
id |
|
Returns
View Source
Media(Udi?)
Declaration
public IPublishedContent? Media(Udi? id)
Parameters
| Type |
Name |
Description |
| Udi |
id |
|
Returns
View Source
MediaAtRoot()
Declaration
public IEnumerable<IPublishedContent> MediaAtRoot()
Returns
View Source
Search(IQueryExecutor)
Declaration
public IEnumerable<PublishedSearchResult> Search(IQueryExecutor query)
Parameters
| Type |
Name |
Description |
| IQueryExecutor |
query |
The query.
|
Returns
View Source
Search(IQueryExecutor, int, int, out long)
Declaration
public IEnumerable<PublishedSearchResult> Search(IQueryExecutor query, int skip, int take, out long totalRecords)
Parameters
| Type |
Name |
Description |
| IQueryExecutor |
query |
The query.
|
| int |
skip |
The amount of results to skip.
|
| int |
take |
The amount of results to take/return.
|
| long |
totalRecords |
The total amount of records.
|
Returns
View Source
Search(IQueryExecutor, int, int, out long, string?)
Declaration
public IEnumerable<PublishedSearchResult> Search(IQueryExecutor query, int skip, int take, out long totalRecords, string? culture)
Parameters
| Type |
Name |
Description |
| IQueryExecutor |
query |
The query.
|
| int |
skip |
The amount of results to skip.
|
| int |
take |
The amount of results to take/return.
|
| long |
totalRecords |
The total amount of records.
|
| string |
culture |
The culture (defaults to a culture insensitive search).
|
Returns
View Source
Search(string, int, int, out long, string, string, ISet<string>?)
Declaration
public IEnumerable<PublishedSearchResult> Search(string term, int skip, int take, out long totalRecords, string culture = "*", string indexName = "ExternalIndex", ISet<string>? loadedFields = null)
Parameters
| Type |
Name |
Description |
| string |
term |
The term to search.
|
| int |
skip |
The amount of results to skip.
|
| int |
take |
The amount of results to take/return.
|
| long |
totalRecords |
The total amount of records.
|
| string |
culture |
The culture (defaults to a culture insensitive search).
|
| string |
indexName |
The name of the index to search (defaults to
ExternalIndexName).
|
| ISet<string> |
loadedFields |
This parameter is no longer used, because the results are loaded from the published snapshot
using the single item ID field.
|
Returns
View Source
Search(string, string, string)
Declaration
public IEnumerable<PublishedSearchResult> Search(string term, string culture = "*", string indexName = "ExternalIndex")
Parameters
| Type |
Name |
Description |
| string |
term |
The term to search.
|
| string |
culture |
The culture (defaults to a culture insensitive search).
|
| string |
indexName |
The name of the index to search (defaults to
ExternalIndexName).
|
Returns