Skip to content

Commit

Permalink
Merge 55b222b into ae73b8c
Browse files Browse the repository at this point in the history
  • Loading branch information
cea2aj committed Sep 29, 2023
2 parents ae73b8c + 55b222b commit 6f53ffa
Show file tree
Hide file tree
Showing 15 changed files with 47 additions and 47 deletions.
21 changes: 0 additions & 21 deletions docs/search-core.document_2.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [Document\_2](./search-core.document_2.md) &gt; [documentScore](./search-core.document_2.documentscore.md)
[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [DocumentResult](./search-core.documentresult.md) &gt; [documentScore](./search-core.documentresult.documentscore.md)

## Document\_2.documentScore property
## DocumentResult.documentScore property

The score calculated from whatever document search strategy was used.

Expand Down
21 changes: 21 additions & 0 deletions docs/search-core.documentresult.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [DocumentResult](./search-core.documentresult.md)

## DocumentResult interface

Details about the document and the document search algorithm

<b>Signature:</b>

```typescript
export interface DocumentResult
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [documentScore](./search-core.documentresult.documentscore.md) | number | The score calculated from whatever document search strategy was used. |
| [segments](./search-core.documentresult.segments.md) | [Segment](./search-core.segment.md)<!-- -->\[\] | All the relevant segments extracted from the document. |

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [Document\_2](./search-core.document_2.md) &gt; [segments](./search-core.document_2.segments.md)
[Home](./index.md) &gt; [@yext/search-core](./search-core.md) &gt; [DocumentResult](./search-core.documentresult.md) &gt; [segments](./search-core.documentresult.segments.md)

## Document\_2.segments property
## DocumentResult.segments property

All the relevant segments extracted from the document.

Expand Down
2 changes: 1 addition & 1 deletion docs/search-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
| [DisjunctionStaticFilter](./search-core.disjunctionstaticfilter.md) | 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](./search-core.displayablefacet.md) | A [Facet](./search-core.facet.md) which contains extra fields meant to be displayed to the end user. |
| [DisplayableFacetOption](./search-core.displayablefacetoption.md) | A [FacetOption](./search-core.facetoption.md) with extra data meant to be displayed to the end user. |
| [Document\_2](./search-core.document_2.md) | Details about the document and the document search algorithm |
| [DocumentResult](./search-core.documentresult.md) | Details about the document and the document search algorithm |
| [EmailDirectAnswer](./search-core.emaildirectanswer.md) | A [BaseFieldValueDirectAnswer](./search-core.basefieldvaluedirectanswer.md) interface with 'email' field type. |
| [Endpoints](./search-core.endpoints.md) | Overrides for the URLs which are used when making requests to the Search API. |
| [FacebookUrlDirectAnswer](./search-core.facebookurldirectanswer.md) | A direct answer for a facebook url field. |
Expand Down
2 changes: 1 addition & 1 deletion docs/search-core.result.document.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ A relevant document associated with the result. Present for document verticals g
<b>Signature:</b>

```typescript
document?: Document;
document?: DocumentResult;
```
2 changes: 1 addition & 1 deletion docs/search-core.result.documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ All relevant documents associated with the result. Present for document vertical
<b>Signature:</b>

```typescript
documents?: Document[];
documents?: DocumentResult[];
```
6 changes: 3 additions & 3 deletions docs/search-core.result.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ export interface Result<T = Record<string, unknown>>
| [description?](./search-core.result.description.md) | string | <i>(Optional)</i> A description of the result. |
| [distance?](./search-core.result.distance.md) | number | <i>(Optional)</i> The distance from the user to the result in meters. |
| [distanceFromFilter?](./search-core.result.distancefromfilter.md) | number | <i>(Optional)</i> The distance from a [AppliedQueryFilter](./search-core.appliedqueryfilter.md) location to the result in meters. |
| [document?](./search-core.result.document.md) | Document | <i>(Optional)</i> A relevant document associated with the result. Present for document verticals grouped by Document. |
| [documents?](./search-core.result.documents.md) | Document\[\] | <i>(Optional)</i> All relevant documents associated with the result. Present for document verticals grouped by Entity. |
| [document?](./search-core.result.document.md) | [DocumentResult](./search-core.documentresult.md) | <i>(Optional)</i> A relevant document associated with the result. Present for document verticals grouped by Document. |
| [documents?](./search-core.result.documents.md) | [DocumentResult](./search-core.documentresult.md)<!-- -->\[\] | <i>(Optional)</i> All relevant documents associated with the result. Present for document verticals grouped by Entity. |
| [entityType?](./search-core.result.entitytype.md) | string | <i>(Optional)</i> The entity type of the result. |
| [highlightedFields?](./search-core.result.highlightedfields.md) | [HighlightedFields](./search-core.highlightedfields.md) | <i>(Optional)</i> The [highlighted fields](./search-core.highlightedfields.md) emphasized by the api. |
| [id?](./search-core.result.id.md) | string | <i>(Optional)</i> The result ID which depends on the Result Source. |
| [index?](./search-core.result.index.md) | number | <i>(Optional)</i> The index of the result among the other results in the search. |
| [link?](./search-core.result.link.md) | string | <i>(Optional)</i> A hyperlink associated with the result. |
| [name?](./search-core.result.name.md) | string | <i>(Optional)</i> The name of the result. |
| [rawData](./search-core.result.rawdata.md) | T | Raw entity profile data in the shape of key-value pairs. |
| [rawData](./search-core.result.rawdata.md) | T \| T\[\] | Raw entity profile data in the shape of key-value pairs, or as an array of key-value pairs. |
| [segment?](./search-core.result.segment.md) | [Segment](./search-core.segment.md) | <i>(Optional)</i> A relevant segment associated with the result. Present for document verticals grouped by Segment. |
| [source](./search-core.result.source.md) | [Source](./search-core.source.md) | Represents the source of a [Result](./search-core.result.md)<!-- -->. |

4 changes: 2 additions & 2 deletions docs/search-core.result.rawdata.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

## Result.rawData property

Raw entity profile data in the shape of key-value pairs.
Raw entity profile data in the shape of key-value pairs, or as an array of key-value pairs.

<b>Signature:</b>

```typescript
rawData: T;
rawData: T | T[];
```
9 changes: 4 additions & 5 deletions etc/search-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,10 @@ export interface DisplayableFacetOption extends FacetOption {
}

// @public
interface Document_2 {
export interface DocumentResult {
documentScore: number;
segments: Segment[];
}
export { Document_2 as Document }

// @public
export interface EmailDirectAnswer extends BaseFieldValueDirectAnswer<string[]> {
Expand Down Expand Up @@ -601,15 +600,15 @@ export interface Result<T = Record<string, unknown>> {
description?: string;
distance?: number;
distanceFromFilter?: number;
document?: Document;
documents?: Document[];
document?: DocumentResult;
documents?: DocumentResult[];
entityType?: string;
highlightedFields?: HighlightedFields;
id?: string;
index?: number;
link?: string;
name?: string;
rawData: T;
rawData: T | T[];
segment?: Segment;
source: Source;
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yext/search-core",
"version": "2.5.0-alpha.0",
"version": "2.5.0-beta.1",
"description": "Typescript Networking Library for the Yext Search API",
"main": "./dist/commonjs/src/index.js",
"module": "./dist/esm/src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export { Snippet } from './searchservice/response/Snippet';
export { ErrorType } from './searchservice/response/ErrorType';
export { FailedVertical } from './searchservice/response/FailedVertical';
export { Segment } from './searchservice/response/Segment';
export { Document } from './searchservice/response/Document';
export { DocumentResult } from './searchservice/response/DocumentResult';

// Search service common models
export { Matcher } from './searchservice/common/Matcher';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Segment } from './Segment';
*
* @public
*/
export interface Document {
export interface DocumentResult {
/** The score calculated from whatever document search strategy was used. */
documentScore: number,
/** All the relevant segments extracted from the document. */
Expand Down
9 changes: 5 additions & 4 deletions src/models/searchservice/response/Result.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { HighlightedFields } from './HighlightedFields';
import { Source } from './Source';
import { Segment } from './Segment';
import { DocumentResult } from './DocumentResult';

/**
* An individual search result.
*
* @public
*/
export interface Result<T = Record<string, unknown>> {
/** Raw entity profile data in the shape of key-value pairs. */
rawData: T,
/** Raw entity profile data in the shape of key-value pairs, or as an array of key-value pairs. */
rawData: T | T[],
/** {@inheritDoc Source} */
source: Source,
/** The index of the result among the other results in the search. */
Expand Down Expand Up @@ -48,10 +49,10 @@ export interface Result<T = Record<string, unknown>> {
* A relevant document associated with the result. Present for document verticals grouped by
* Document.
*/
document?: Document,
document?: DocumentResult,
/**
* All relevant documents associated with the result. Present for document verticals grouped by
* Entity.
*/
documents?: Document[]
documents?: DocumentResult[]
}

0 comments on commit 6f53ffa

Please sign in to comment.