Show / Hide Table of Contents

Class SearchFacet

Represents a facet used to search the repository

Inheritance
Object
SearchFacet
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: Algenta.Colectica.Model.Repository
Assembly: Algenta.Colectica.Model.dll
Syntax
[DataContract(Namespace = "http://ns.colectica.com/2009/07/")]
public class SearchFacet
Examples
// Search the entire repository for all variables with the word 
// "age".
var facet = new SearchFacet();
facet.ItemTypes.Add(DdiItemType.Variable);
facet.SearchTerms.Add("age");

// Perform the search.
var response = client.Search(facet);

// Show a summary of the search results. How many items were found
// and how long the search took.
Console.WriteLine(string.Format(
    "Displaying {0} of {1} results. Search took {2}.",
    response.ReturnedResults,
    response.TotalResults,
    response.RepositoryTime));

// Write a line for each result.
foreach (var result in response.Results)
{
    Console.WriteLine(result.Label["en-US"]);
}

Constructors

SearchFacet()

Initializes a new instance of the SearchFacet class.

Declaration
public SearchFacet()

Properties

Cultures

Gets the languages to be searched for any SearchTerms.

Declaration
[DataMember(Name = "Cultures")]
public Collection<string> Cultures { get; set; }
Property Value
Type Description
Collection<String>

ItemTypes

Gets the types of items that should be returned from a search.

Declaration
[DataMember(Name = "ItemTypes")]
public Collection<Guid> ItemTypes { get; set; }
Property Value
Type Description
Collection<Guid>

LanguageSortOrder

Gets the language sort order for alphabetical sorting multilingual strings.

Declaration
[DataMember(Name = "LanguageSortOrder")]
public Collection<string> LanguageSortOrder { get; set; }
Property Value
Type Description
Collection<String>
Remarks

The Repository's language order will be used if none are provided

MaxResults

Gets or sets the maximum number of results to be returned.

Declaration
[DataMember]
public int MaxResults { get; set; }
Property Value
Type Description
Int32

RankResults

Gets or sets a value indicating whether to rank search results by MetadataRank.

Declaration
[DataMember]
public bool RankResults { get; set; }
Property Value
Type Description
Boolean

ResultOffset

Gets or sets the offset of the first result to be returned. This is used for paging search results.

Declaration
[DataMember]
public int ResultOffset { get; set; }
Property Value
Type Description
Int32

ResultOrdering

Gets or sets the criteria used to order the search results.

Declaration
[DataMember]
public SearchResultOrdering ResultOrdering { get; set; }
Property Value
Type Description
SearchResultOrdering

SearchDepricatedItems

Gets or sets a value indicating whether deprecated items should be included in search results.

Declaration
[DataMember]
public bool SearchDepricatedItems { get; set; }
Property Value
Type Description
Boolean

SearchLatestVersion

Gets or sets a value indicating whether to only include the latest versions of items in the search results.

Declaration
[DataMember]
public bool SearchLatestVersion { get; set; }
Property Value
Type Description
Boolean

SearchSetPredicate

Gets or sets the predicate that set search results must match. See RelationshipPredicates.

Declaration
[DataMember]
public Guid SearchSetPredicate { get; set; }
Property Value
Type Description
Guid

SearchSets

Perform the search within the set identified by the root items in the search set.

Declaration
[DataMember(Name = "SearchSets")]
public Collection<IdentifierTriple> SearchSets { get; set; }
Property Value
Type Description
Collection<IdentifierTriple>

SearchTargets

Gets the types of text fields that should be searched for any SearchTerms.

Declaration
[DataMember(Name = "SearchTargets")]
public Collection<DdiStringType> SearchTargets { get; set; }
Property Value
Type Description
Collection<DdiStringType>

SearchTerms

Gets the textual search terms that results must match.

Declaration
[DataMember(Name = "SearchTerms")]
public Collection<string> SearchTerms { get; set; }
Property Value
Type Description
Collection<String>

UsePrefixSearch

Gets or sets a value indicating whether a prefix search should be used.

Declaration
[DataMember]
public bool UsePrefixSearch { get; set; }
Property Value
Type Description
Boolean

Extension Methods

Extensions.Yield<T>(T)
Extensions.EnsureCollectionInstantiation(SearchFacet)
In This Article
Back to top Generated by DocFX