Interface IPublishedContentQuery2
Namespace: Umbraco.Web
Assembly: Umbraco.Web.dll
Syntax
public interface IPublishedContentQuery2 : IPublishedContentQuery
Methods
View SourceSearch(String, Int32, Int32, out Int64, String, String, ISet<String>)
Searches content.
Declaration
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 |
---|---|---|
System.String | term | The term to search. |
System.Int32 | skip | The amount of results to skip. |
System.Int32 | take | The amount of results to take/return. |
System.Int64 | totalRecords | The total amount of records. |
System.String | culture | The culture (defaults to a culture insensitive search). |
System.String | indexName | The name of the index to search (defaults to ExternalIndexName). |
System.Collections.Generic.ISet<System.String> | loadedFields | The fields to load in the results of the search (defaults to all fields loaded). |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<PublishedSearchResult> | The search results. |
Remarks
When the culture
is not specified or is *, all cultures are searched.
To search for only invariant documents and fields use null.
When searching on a specific culture, all culture specific fields are searched for the provided culture and all invariant fields for all documents.
While enumerating results, the ambient culture is changed to be the searched culture.