Show / Hide Table of Contents

Class SearchFacet

Represents a facet used to search the repository

Inheritance
System.Object
SearchFacet
Namespace: Algenta.Colectica.Model.Repository
Assembly: Algenta.Colectica.Model.dll
Syntax
public class SearchFacet : object
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
public Collection<string> Cultures { get; }
Property Value
Type Description
Collection<System.String>

ItemTypes

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

Declaration
public Collection<Guid> ItemTypes { get; }
Property Value
Type Description
Collection<Guid>

LanguageSortOrder

Gets the language sort order for alphabetical sorting multilingual strings.

Declaration
public Collection<string> LanguageSortOrder { get; }
Property Value
Type Description
Collection<System.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
public int MaxResults { get; set; }
Property Value
Type Description
System.Int32

RankResults

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

Declaration
public bool RankResults { get; set; }
Property Value
Type Description
System.Boolean

ResultOffset

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

Declaration
public int ResultOffset { get; set; }
Property Value
Type Description
System.Int32

ResultOrdering

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

Declaration
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
public bool SearchDepricatedItems { get; set; }
Property Value
Type Description
System.Boolean

SearchLatestVersion

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

Declaration
public bool SearchLatestVersion { get; set; }
Property Value
Type Description
System.Boolean

SearchSetPredicate

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

Declaration
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
public Collection<IdentifierTriple> SearchSets { get; }
Property Value
Type Description
Collection<IdentifierTriple>

SearchTargets

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

Declaration
public Collection<DdiStringType> SearchTargets { get; }
Property Value
Type Description
Collection<DdiStringType>

SearchTerms

Gets the textual search terms that results must match.

Declaration
public Collection<string> SearchTerms { get; }
Property Value
Type Description
Collection<System.String>

UsePrefixSearch

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

Declaration
public bool UsePrefixSearch { get; set; }
Property Value
Type Description
System.Boolean

Extension Methods

Extensions.Yield<T>(T)
Back to top Copyright © 2009-2018 Colectica