Click or drag to resize
SearchResults Class
Represents a set of results returned by the translation memory after a search operation for a given input (segment/translation unit/string).
Inheritance Hierarchy

Namespace: Sdl.LanguagePlatform.TranslationMemory
Assembly: Sdl.LanguagePlatform.TranslationMemory (in Sdl.LanguagePlatform.TranslationMemory.dll) Version: 1.6.0.0 (1.7.3662.0)
Syntax
public class SearchResults : IEnumerable<SearchResult>, 
	IEnumerable

The SearchResults type exposes the following members.

Constructors
  NameDescription
Public methodSearchResults
Initializes a new instance with default values.
Public methodSearchResults(SortSpecification)
Initializes a new instance with the specified sort order.
Top
Properties
  NameDescription
Public propertyCount
Gets the number of results in this instance.
Public propertyDocumentPlaceables
Gets or sets the source segment placeables. The value is usually set by the search engine.
Public propertyItem
Gets or sets the search results at the specified index in the collection.
Public propertyMultipleTranslations
Gets or sets the flag whether there exist multiple exact matches in the result set. Note that there also is a MultipleTranslationsPenalty in each match result. However, the penalty will only be set if the malus is > 0, but the MultipleTrnaslations flag will be set independently.
Public propertyResults
Gets or sets the sesarch results.
Public propertySortOrder
Gets or sets the sort order. The search results are not re-sorted if this field is set. To re-sort, call Sort() after setting the value.
Public propertySourceHash
Gets or sets the source segment's hash value.
Public propertySourceSegment
Gets or sets the document source segment for this instance. The value is set by the search engine.
Public propertySourceWordCounts
Gets or sets the source word counts for this instance.
Top
Methods
  NameDescription
Public methodAdd
Adds a new search result to the collection.
Public methodStatic memberAreEqual
Determines whether two search results are equal, by comparing the segments of the memory translation units.
Public methodCap
Caps the number of search results to at most maxCapacity elements. If the object holds less than the maximum number, this method has no effect.
Public methodCheckForMultipleTranslations
Count the number of exact matches in the result and set the MultipleTranslations flag and penalty accordingly. This is only valid for normal searches; nothing will be changed for concordance searches.
Public methodClear
Removes all results.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMerge
Appends addtional search results to the current list of search results. Note that other fields, such as the source tokens or the source word count, are not merged (although they may differ for cross-TM searches).
Public methodRemoveAll
Removes all the elements that match the condition defined by the specified predicate
Public methodRemoveDuplicates
Removes any duplicate search results. The duplicate with the lowest index is kept, and other duplicates are removed.
Public methodRemoveDuplicates(FuncSearchResult, SearchResult, SearchResult)
Removes any duplicate search results.
Public methodSort
Sorts the results in this instance using the currently set sort order (see SortOrder), or the default sort order if no sort order is set.
Public methodSort(String)
Sorts the results in this instance based on the specified sort order.
Public methodSort(SortSpecification)
Sorts the results in this instance based on the specified sort order.
Public methodSort(SortSpecification, SearchResultsSearchResultComparer)
Sorts the results in this instance based on the specified sort order.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldStatic memberDefaultSortOrder
The default sort order, in string representation, for normal searches. The primary sort key is the score (descending), the secondary sort key is the use count (descending), and the tertiary sort key is the use date (descending).
Public fieldStatic memberDefaultSortOrderConcordance
The default sort order, in string representation, for concordance searches. The primary sort key is the score (descending), the secondary sort key is the change date (descending), and the tertiary sort key is the use count (descending).
Top
See Also
Community
Edit

Be the first to Edit the community content of this topic.
Comments