Skip to content

Latest commit

 

History

History
146 lines (131 loc) · 16.2 KB

search-core.md

File metadata and controls

146 lines (131 loc) · 16.2 KB

Home > @yext/search-core

search-core package

Classes

Class Description
SearchCore Provides methods for executing searches, submitting questions, and performing autocompletes.
SearchError Represents an error

Enumerations

Enumeration Description
AppliedQueryFilterType Represents the type of AppliedQueryFilter applied to a search.
BuiltInFieldType Possible built-in field types for DirectAnswer.fieldType.
CloudRegion Defines the cloud region of the API domains.
DirectAnswerType Represents the type of direct answer.
Direction The direction of a sort.
Environment Defines the environment of the API domains.
ErrorType Identifier for the type of error causing the failure.
FilterCombinator Indicates how child filters in a StaticFilter should be combined.
LocationBiasMethod The method used to determine the location.
Matcher A Matcher is a filtering operation.
QuerySource The source of the search request.
QueryTrigger Describes the ways a search can be executed besides user input.
SearchIntent Represents intents from the Search API.
SortType The method of sorting.
Source Represents the source of a Result.
SpellCheckType Represents the type of spell check performed.

Functions

Function Description
provideCore(config) The entrypoint to the search-core library.

Interfaces

Interface Description
AdditionalHttpHeaders AdditionalHttpHeaders allows users to specify additional values for specific HTTP headers.
Address An interface with address fields to use in BaseFieldValueDirectAnswer.value.
AddressDirectAnswer A BaseFieldValueDirectAnswer interface with 'address' field type.
AndroidAppUrlDirectAnswer A direct answer for an android app url field.
AppliedQueryFilter A filter that the Search API applied to the search.
AutocompleteResponse The response of a universal or vertical autocomplete request.
AutocompleteResult An autocomplete suggestion.
AutocompleteService A service for autocomplete requests.
BaseFeaturedSnippetDirectAnswer A direct answer which was found within a document.
BaseFieldValueDirectAnswer A direct answer where the answer came from a field from the knowledge graph.
BaseSearchConfig The base configuration options for SearchCore, which includes the options from ServingConfig.
ClientSDKHeaderValues Additional agents and their versions used to create the Search experience. The information for these agents is added to the Client-SDK HTTP header along with that of the ANSWERS_CORE agent.
ComplexURL The shape of a BuiltInFieldType.ComplexURL DirectAnswer value
ComplexUrlDirectAnswer A direct answer for a complex url field.
ConjunctionStaticFilter A static filter composed by combining other static filters with the logical AND operator.
DayHour An interface for a day's hours to use in BaseFieldValueDirectAnswer.value.
DecimalDirectAnswer A direct answer for a decimal field, which is a number represented using a string.
DirectAnswer A direct answer to a search.
DisjunctionStaticFilter A static filter composed by combining filters with the logical OR operator. The combined filters can either be field value filters or other disjunction filters.
DisplayableFacet A Facet which contains extra fields meant to be displayed to the end user.
DisplayableFacetOption A FacetOption with extra data meant to be displayed to the end user.
DocumentResult Details about the document and the document search algorithm
EmailDirectAnswer A BaseFieldValueDirectAnswer interface with 'email' field type.
Endpoints Overrides for the URLs which are used when making requests to the Search API.
FacebookUrlDirectAnswer A direct answer for a facebook url field.
Facet Represents dynamic filter options for the Search API.
FacetOption A filter associated with the facet.
FailedVertical Error information from when a vertical fails to return results.
FieldValueFilter Represents a filter which compares values to a single field.
FieldValueStaticFilter A FieldValueFilter with the kind of filter specified to discriminate between static filter types.
FilterSearchRequest Options for a filtersearch request.
FilterSearchResponse The response of a filtersearch request.
HighlightedValue A field value and its substring matches as emphasized by the Search API.
HolidayHours An interface for holiday hours to use in BaseFieldValueDirectAnswer.value.
Hours An interface for hours fields to use in BaseFieldValueDirectAnswer.value.
HoursDirectAnswer A BaseFieldValueDirectAnswer interface with 'hours' field type.
HTMLSnippetDirectAnswer A BaseFeaturedSnippetDirectAnswer with 'html' field type. "value" field is omitted for featured snippet direct answer of this field type.
InstagramHandleDirectAnswer A direct answer for an instagram handle field.
IntegerDirectAnswer A direct answer for an integer field.
Interval An interface for a time interval to use in BaseFieldValueDirectAnswer.value.
IosAppUrlDirectAnswer A direct answer for an iOS app url field.
LatLong The latitude and longitude of the user making the request. Used to bias the results.
LocationBias Information about the user's location.
LocationBoundingBox Location boundaries for a filter with "Place" for its AppliedQueryFilterType. (e.g. boundary for a locality or region specific location filter)
LocationFilterDetails Additional details relevant to the filter with "PLACE" for its AppliedQueryFilterType.
LowerNumberRangeLimit The start limit of NumberRangeValue.
MarkdownSnippetDirectAnswer A BaseFeaturedSnippetDirectAnswer with 'markdown' field type. "value" field is omitted for featured snippet direct answer of this field type.
MultiLineTextSnippetDirectAnswer A BaseFeaturedSnippetDirectAnswer with 'multi_line_text' field type.
NearFilterValue A filter value for a filter with a $near Matcher.
NumberRangeValue A filter value for a filter with a $between Matcher.
PhoneDirectAnswer A BaseFieldValueDirectAnswer interface with phone value.
QueryRulesActionsData Data returned from the Search query rules system.
QuestionSubmissionRequest Options for a QuestionSubmission request.
QuestionSubmissionResponse A representation of a question submission response.
QuestionSubmissionService Submits a custom question to the Search API.
Result An individual search result.
RichTextDirectAnswer A direct answer for a rich text field.
RichTextSnippetDirectAnswer A BaseFeaturedSnippetDirectAnswer with 'rich_text' field type. "value" field is omitted for featured snippet direct answer of this field type.
RichTextV2SnippetDirectAnswer A BaseFeaturedSnippetDirectAnswer with 'rich_text_v2' field type. "value" field is omitted for featured snippet direct answer of this field type.
SearchConfigWithApiKey Configuration options for SearchCore, which includes the options from BaseSearchConfig, but requires apiKey.
SearchConfigWithToken Configuration options for SearchCore, which includes the options from BaseSearchConfig, but requires token.
SearchParameterField Indicates which entity field to perform the autocomplete request on.
SearchRequest Options for a Search API request.
SearchService A service which performs Yext Search.
Segment A result produced by a document vertical.
ServingConfig The configuration options for getting the endpoints.
Snippet The section of text where a FeaturedSnippetDirectAnswer was found.
SortBy Represents a criterion that can be used to sort results.
SpellCheck A spellcheck response from a search query.
TextDirectAnswer A direct answer whose source is a string or string list field in the knowledge graph.
TwitterHandleDirectAnswer A direct answer for an twitter handle field.
UniversalAutocompleteRequest Options for a universal autocomplete request.
UniversalLimit The maximum limit of results per vertical. Each limit can be set from 1-50, inclusive.
UniversalSearchRequest Options which can be specified for a universal search.
UniversalSearchResponse A representation of a response from a universal search.
UnknownFieldValueDirectAnswer A BaseFieldValueDirectAnswer with a field type outside of BuiltInFieldType.
UpperNumberRangeLimit The end limit of NumberRangeValue.
UrlDirectAnswer A direct answer for a simple url field.
VerticalAutocompleteRequest Options for a vertial autocomplete request.
VerticalResults Represents results from a search vertical.
VerticalSearchRequest Options which can be specified for a vertical search.
VerticalSearchResponse A representation of a response from a vertical search.
Visitor Information used to associate requests with a particular user.

Variables

Variable Description
SandboxEndpoints The endpoints to use for sandbox experiences.

Type Aliases

Type Alias Description
Context Used to trigger Search Query Rules.
EnumOrLiteral Produces a union type from the enum passed as a generic which consists of the enum values and the string literals of the enum.
FeaturedSnippetDirectAnswer All possible built-in BaseFeaturedSnippetDirectAnswer interfaces.
FieldValueDirectAnswer Possible built-in and custom BaseFieldValueDirectAnswer interfaces.
HighlightedFields A mapping of fields to the values emphasized by the Search API.
SearchConfig The main configuration options for SearchCore. For a full description of the options, see BaseSearchConfig. The config requires either an apiKey or a token.
StaticFilter Represents a static filter that will be used to refine results.