Documentation
¶
Index ¶
- Variables
- type Collection
- type EntitySearchRequest
- type EntitySearchRequestBase
- type EntitySearchResponse
- type FeedInfo
- type Filter
- type Hit
- type InfoCodes
- type PackageHit
- type PackageResult
- type PackageSearchRequest
- type PackageSearchResponse
- type PackageSearchResponseContent
- type ProjectReference
- type Repository
- type ScrollSearchRequest
- type SearchScope
- type SettingResult
- type SettingSearchRequest
- type SettingSearchResponse
- type SortOption
- type SortOrder
- type Version
- type VersionControlType
- type Wiki
- type WikiHit
- type WikiResult
- type WikiSearchRequest
- type WikiSearchResponse
Constants ¶
This section is empty.
Variables ¶
var InfoCodesValues = infoCodesValuesType{
Ok: "ok",
AccountIsBeingReindexed: "accountIsBeingReindexed",
IndexingNotStarted: "indexingNotStarted",
InvalidRequest: "invalidRequest",
PrefixWildcardQueryNotSupported: "prefixWildcardQueryNotSupported",
MultiWordWithCodeFacetNotSupported: "multiWordWithCodeFacetNotSupported",
AccountIsBeingOnboarded: "accountIsBeingOnboarded",
TakeResultValueTrimmedToMaxResultAllowed: "takeResultValueTrimmedToMaxResultAllowed",
BranchesAreBeingIndexed: "branchesAreBeingIndexed",
FacetingNotEnabledAtScaleUnit: "facetingNotEnabledAtScaleUnit",
WorkItemsNotAccessible: "workItemsNotAccessible",
EmptyQueryNotSupported: "emptyQueryNotSupported",
OnlyWildcardQueryNotSupported: "onlyWildcardQueryNotSupported",
ZeroResultsWithWildcard: "zeroResultsWithWildcard",
ZeroResultsWithFilter: "zeroResultsWithFilter",
ZeroResultsWithWildcardAndFilter: "zeroResultsWithWildcardAndFilter",
ZeroResultsWithNoWildcardNoFilter: "zeroResultsWithNoWildcardNoFilter",
PartialResultsDueToSearchRequestTimeout: "partialResultsDueToSearchRequestTimeout",
PhraseQueriesWithCEFacetsNotSupported: "phraseQueriesWithCEFacetsNotSupported",
WildcardQueriesWithCEFacetsNotSupported: "wildcardQueriesWithCEFacetsNotSupported",
ClearedScrollSearchRequestParam: "clearedScrollSearchRequestParam",
InvalidScrollSearchRequestParam: "invalidScrollSearchRequestParam",
StopWarmerRequests: "stopWarmerRequests",
WildCardPartialResults: "wildCardPartialResults",
ReindexingCompleted: "reindexingCompleted",
ReindexingInProgress: "reindexingInProgress",
InvalidIndexingMode: "invalidIndexingMode",
ReindexingPausedForPrimaryIndexingUnit: "reindexingPausedForPrimaryIndexingUnit",
WildcardSubstringTooShort: "wildcardSubstringTooShort",
UnsupportedProximitySearchTerm: "unsupportedProximitySearchTerm",
PrefixSuffixSubStringTooShort: "prefixSuffixSubStringTooShort",
SubstringWithInfixWildcard: "substringWithInfixWildcard",
SubstringWithInfixWildcardCEFFacets: "substringWithInfixWildcardCEFFacets",
SubstringSearchCEFFacets: "substringSearchCEFFacets",
QuestionMarkWildcardSubstring: "questionMarkWildcardSubstring",
MixedWildcardSubstring: "mixedWildcardSubstring",
}
var SearchScopeValues = searchScopeValuesType{
None: "none",
Organization: "organization",
Project: "project",
User: "user",
}
var SortOrderValues = sortOrderValuesType{
Undefined: "undefined",
Ascending: "ascending",
Descending: "descending",
}
var VersionControlTypeValues = versionControlTypeValuesType{
Git: "git",
Tfvc: "tfvc",
Custom: "custom",
}
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct { // Name of the collection. Name *string `json:"name,omitempty"` }
Defines the details of the collection.
type EntitySearchRequest ¶
type EntitySearchRequest struct { // Filters to be applied. Set it to null if there are no filters to be applied. Filters *map[string][]string `json:"filters,omitempty"` // The search text. SearchText *string `json:"searchText,omitempty"` // Options for sorting search results. If set to null, the results will be returned sorted by relevance. If more than one sort option is provided, the results are sorted in the order specified in the OrderBy. OrderBy *[]SortOption `json:"$orderBy,omitempty"` // Number of results to be skipped. Skip *int `json:"$skip,omitempty"` // Number of results to be returned. Top *int `json:"$top,omitempty"` // Flag to opt for faceting in the result. Default behavior is false. IncludeFacets *bool `json:"includeFacets,omitempty"` }
Base contract for search request types without scroll support.
type EntitySearchRequestBase ¶
type EntitySearchRequestBase struct { // Filters to be applied. Set it to null if there are no filters to be applied. Filters *map[string][]string `json:"filters,omitempty"` // The search text. SearchText *string `json:"searchText,omitempty"` }
Base class for search request types.
type EntitySearchResponse ¶
type EntitySearchResponse struct { // A dictionary storing an array of <code>Filter</code> object against each facet. Facets *map[string][]Filter `json:"facets,omitempty"` // Numeric code indicating any additional information: 0 - Ok, 1 - Account is being reindexed, 2 - Account indexing has not started, 3 - Invalid Request, 4 - Prefix wildcard query not supported, 5 - MultiWords with code facet not supported, 6 - Account is being onboarded, 7 - Account is being onboarded or reindexed, 8 - Top value trimmed to maxresult allowed 9 - Branches are being indexed, 10 - Faceting not enabled, 11 - Work items not accessible, 19 - Phrase queries with code type filters not supported, 20 - Wildcard queries with code type filters not supported. Any other info code is used for internal purpose. InfoCode *int `json:"infoCode,omitempty"` }
Defines the base contract for search response.
type FeedInfo ¶
type FeedInfo struct { // Id of the collection. CollectionId *string `json:"collectionId,omitempty"` // Name of the collection. CollectionName *string `json:"collectionName,omitempty"` // Id of the feed. FeedId *string `json:"feedId,omitempty"` // Name of the feed. FeedName *string `json:"feedName,omitempty"` // Latest matched version of package in this Feed. LatestMatchedVersion *string `json:"latestMatchedVersion,omitempty"` // Latest version of package in this Feed. LatestVersion *string `json:"latestVersion,omitempty"` // Url of package in this Feed. PackageUrl *string `json:"packageUrl,omitempty"` // List of views which contain the matched package. Views *[]string `json:"views,omitempty"` }
Defines the details of a feed.
type Filter ¶
type Filter struct { // Id of the filter bucket. Id *string `json:"id,omitempty"` // Name of the filter bucket. Name *string `json:"name,omitempty"` // Count of matches in the filter bucket. ResultCount *int `json:"resultCount,omitempty"` }
Describes a filter bucket item representing the total matches of search result, name and id.
type Hit ¶
type Hit struct { // Gets or sets an extract of code where the match appears. Usually it is the line where there is the match. CodeSnippet *string `json:"codeSnippet,omitempty"` // Gets or sets the column number where the match appears in the line. Column *int `json:"column,omitempty"` // Gets or sets the start character offset of a piece of text. CharOffset *int `json:"charOffset,omitempty"` // Gets or sets the length of a piece of text. Length *int `json:"length,omitempty"` // Gets or sets the line number where the match appears in the file. Line *int `json:"line,omitempty"` // Gets or sets the name of type of a piece of text. Type *string `json:"type,omitempty"` }
Describes the position of a piece of text in a document.
type InfoCodes ¶
type InfoCodes string
Standard info codes that we return from Query Pipeline to UX/Client as part of REST contracts
type PackageHit ¶
type PackageHit struct { // Reference name of the highlighted field. FieldReferenceName *string `json:"fieldReferenceName,omitempty"` // Matched/highlighted snippets of the field. Highlights *[]string `json:"highlights,omitempty"` }
Defines the matched terms in the field of the package result.
type PackageResult ¶
type PackageResult struct { // Description of the package. Description *string `json:"description,omitempty"` // List of feeds which contain the matching package. Feeds *[]FeedInfo `json:"feeds,omitempty"` // List of highlighted fields for the match. Hits *[]PackageHit `json:"hits,omitempty"` // Id of the package. Id *string `json:"id,omitempty"` // Name of the package. Name *string `json:"name,omitempty"` // Type of the package. ProtocolType *string `json:"protocolType,omitempty"` }
Defines the package result that matched a package search request.
type PackageSearchRequest ¶
type PackageSearchRequest struct { // Filters to be applied. Set it to null if there are no filters to be applied. Filters *map[string][]string `json:"filters,omitempty"` // The search text. SearchText *string `json:"searchText,omitempty"` // Options for sorting search results. If set to null, the results will be returned sorted by relevance. If more than one sort option is provided, the results are sorted in the order specified in the OrderBy. OrderBy *[]SortOption `json:"$orderBy,omitempty"` // Number of results to be skipped. Skip *int `json:"$skip,omitempty"` // Number of results to be returned. Top *int `json:"$top,omitempty"` // Flag to opt for faceting in the result. Default behavior is false. IncludeFacets *bool `json:"includeFacets,omitempty"` }
Defines a package search request.
type PackageSearchResponse ¶
type PackageSearchResponse struct { ActivityId *[]string `json:"activityId,omitempty"` Content *PackageSearchResponseContent `json:"content,omitempty"` }
type PackageSearchResponseContent ¶
type PackageSearchResponseContent struct { // A dictionary storing an array of <code>Filter</code> object against each facet. Facets *map[string][]Filter `json:"facets,omitempty"` // Numeric code indicating any additional information: 0 - Ok, 1 - Account is being reindexed, 2 - Account indexing has not started, 3 - Invalid Request, 4 - Prefix wildcard query not supported, 5 - MultiWords with code facet not supported, 6 - Account is being onboarded, 7 - Account is being onboarded or reindexed, 8 - Top value trimmed to maxresult allowed 9 - Branches are being indexed, 10 - Faceting not enabled, 11 - Work items not accessible, 19 - Phrase queries with code type filters not supported, 20 - Wildcard queries with code type filters not supported. Any other info code is used for internal purpose. InfoCode *int `json:"infoCode,omitempty"` // Total number of matched packages. Count *int `json:"count,omitempty"` // List of matched packages. Results *[]PackageResult `json:"results,omitempty"` }
Defines a response item that is returned for a package search request.
type ProjectReference ¶
type ProjectReference struct { // ID of the project. Id *uuid.UUID `json:"id,omitempty"` // Name of the project. Name *string `json:"name,omitempty"` // Visibility of the project. Visibility *string `json:"visibility,omitempty"` }
Defines the details of the project.
type Repository ¶
type Repository struct { // Id of the repository. Id *string `json:"id,omitempty"` // Name of the repository. Name *string `json:"name,omitempty"` // Version control type of the result file. Type *VersionControlType `json:"type,omitempty"` }
Defines the details of the repository.
type ScrollSearchRequest ¶
type ScrollSearchRequest struct { // Filters to be applied. Set it to null if there are no filters to be applied. Filters *map[string][]string `json:"filters,omitempty"` // The search text. SearchText *string `json:"searchText,omitempty"` // Scroll Id for scroll search query. ScrollId *string `json:"$scrollId,omitempty"` // Size of data to return for scroll search query. Min value is 201. ScrollSize *int `json:"$scrollSize,omitempty"` }
Defines a scroll code search request.
type SearchScope ¶
type SearchScope string
type SettingResult ¶
type SettingResult struct { // Description of the settings page Description *string `json:"description,omitempty"` // Icon name of the settings page Icon *string `json:"icon,omitempty"` // Contribution url route id of the corresponding settings page RouteId *string `json:"routeId,omitempty"` // Contribution url route parameter of the corresponding settings page RouteParameterMapping *map[string]string `json:"routeParameterMapping,omitempty"` // Scope of the settings page, either organization, project or user Scope *SearchScope `json:"scope,omitempty"` // Title of the settings page Title *string `json:"title,omitempty"` }
Defines the setting result that matched a setting search request
type SettingSearchRequest ¶
type SettingSearchRequest struct { // Filters to be applied. Set it to null if there are no filters to be applied. Filters *map[string][]string `json:"filters,omitempty"` // The search text. SearchText *string `json:"searchText,omitempty"` // Options for sorting search results. If set to null, the results will be returned sorted by relevance. If more than one sort option is provided, the results are sorted in the order specified in the OrderBy. OrderBy *[]SortOption `json:"$orderBy,omitempty"` // Number of results to be skipped. Skip *int `json:"$skip,omitempty"` // Number of results to be returned. Top *int `json:"$top,omitempty"` // Flag to opt for faceting in the result. Default behavior is false. IncludeFacets *bool `json:"includeFacets,omitempty"` }
Defines a setting search request
type SettingSearchResponse ¶
type SettingSearchResponse struct { // A dictionary storing an array of <code>Filter</code> object against each facet. Facets *map[string][]Filter `json:"facets,omitempty"` // Numeric code indicating any additional information: 0 - Ok, 1 - Account is being reindexed, 2 - Account indexing has not started, 3 - Invalid Request, 4 - Prefix wildcard query not supported, 5 - MultiWords with code facet not supported, 6 - Account is being onboarded, 7 - Account is being onboarded or reindexed, 8 - Top value trimmed to maxresult allowed 9 - Branches are being indexed, 10 - Faceting not enabled, 11 - Work items not accessible, 19 - Phrase queries with code type filters not supported, 20 - Wildcard queries with code type filters not supported. Any other info code is used for internal purpose. InfoCode *int `json:"infoCode,omitempty"` // Total number of matched setting documents. Count *int `json:"count,omitempty"` // List of top matched setting documents. Results *[]SettingResult `json:"results,omitempty"` }
Defines a setting search response item
type SortOption ¶
type SortOption struct { // Field name on which sorting should be done. Field *string `json:"field,omitempty"` // Order (ASC/DESC) in which the results should be sorted. SortOrder *string `json:"sortOrder,omitempty"` }
Defines how to sort the result.
type Version ¶
type Version struct { // Name of the branch. BranchName *string `json:"branchName,omitempty"` // ChangeId in the given branch associated with this match. ChangeId *string `json:"changeId,omitempty"` }
Describes the details pertaining to a version of the result file.
type Wiki ¶
type Wiki struct { // Id of the wiki. Id *string `json:"id,omitempty"` // Mapped path for the wiki. MappedPath *string `json:"mappedPath,omitempty"` // Name of the wiki. Name *string `json:"name,omitempty"` // Version for wiki. Version *string `json:"version,omitempty"` }
Defines the details of wiki.
type WikiHit ¶
type WikiHit struct { // Reference name of the highlighted field. FieldReferenceName *string `json:"fieldReferenceName,omitempty"` // Matched/highlighted snippets of the field. Highlights *[]string `json:"highlights,omitempty"` }
Defines the matched terms in the field of the wiki result.
type WikiResult ¶
type WikiResult struct { // Collection of the result file. Collection *Collection `json:"collection,omitempty"` // ContentId of the result file. ContentId *string `json:"contentId,omitempty"` // Name of the result file. FileName *string `json:"fileName,omitempty"` // Highlighted snippets of fields that match the search request. The list is sorted by relevance of the snippets. Hits *[]WikiHit `json:"hits,omitempty"` // Path at which result file is present. Path *string `json:"path,omitempty"` // Project details of the wiki document. Project *ProjectReference `json:"project,omitempty"` // Wiki information for the result. Wiki *Wiki `json:"wiki,omitempty"` }
Defines the wiki result that matched a wiki search request.
type WikiSearchRequest ¶
type WikiSearchRequest struct { // Filters to be applied. Set it to null if there are no filters to be applied. Filters *map[string][]string `json:"filters,omitempty"` // The search text. SearchText *string `json:"searchText,omitempty"` // Options for sorting search results. If set to null, the results will be returned sorted by relevance. If more than one sort option is provided, the results are sorted in the order specified in the OrderBy. OrderBy *[]SortOption `json:"$orderBy,omitempty"` // Number of results to be skipped. Skip *int `json:"$skip,omitempty"` // Number of results to be returned. Top *int `json:"$top,omitempty"` // Flag to opt for faceting in the result. Default behavior is false. IncludeFacets *bool `json:"includeFacets,omitempty"` }
Defines a wiki search request.
type WikiSearchResponse ¶
type WikiSearchResponse struct { // A dictionary storing an array of <code>Filter</code> object against each facet. Facets *map[string][]Filter `json:"facets,omitempty"` // Numeric code indicating any additional information: 0 - Ok, 1 - Account is being reindexed, 2 - Account indexing has not started, 3 - Invalid Request, 4 - Prefix wildcard query not supported, 5 - MultiWords with code facet not supported, 6 - Account is being onboarded, 7 - Account is being onboarded or reindexed, 8 - Top value trimmed to maxresult allowed 9 - Branches are being indexed, 10 - Faceting not enabled, 11 - Work items not accessible, 19 - Phrase queries with code type filters not supported, 20 - Wildcard queries with code type filters not supported. Any other info code is used for internal purpose. InfoCode *int `json:"infoCode,omitempty"` // Total number of matched wiki documents. Count *int `json:"count,omitempty"` // List of top matched wiki documents. Results *[]WikiResult `json:"results,omitempty"` }
Defines a wiki search response item.