diff --git a/docs/search-core.segment.md b/docs/search-core.segment.md index c8755534..8b3f2570 100644 --- a/docs/search-core.segment.md +++ b/docs/search-core.segment.md @@ -16,6 +16,7 @@ export interface Segment | Property | Type | Description | | --- | --- | --- | +| [pageNumber?](./search-core.segment.pagenumber.md) | number | (Optional) The page number of the document that the segment came from. Populated only for pdf files. | | [score](./search-core.segment.score.md) | number | The similarity score of the segment from 0 to 1 | | [text](./search-core.segment.text.md) | string | The value of the segment as plain text. | diff --git a/docs/search-core.segment.pagenumber.md b/docs/search-core.segment.pagenumber.md new file mode 100644 index 00000000..4c41c12a --- /dev/null +++ b/docs/search-core.segment.pagenumber.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@yext/search-core](./search-core.md) > [Segment](./search-core.segment.md) > [pageNumber](./search-core.segment.pagenumber.md) + +## Segment.pageNumber property + +The page number of the document that the segment came from. Populated only for pdf files. + +Signature: + +```typescript +pageNumber?: number; +``` diff --git a/etc/search-core.api.md b/etc/search-core.api.md index b59a512b..d2b5fbc8 100644 --- a/etc/search-core.api.md +++ b/etc/search-core.api.md @@ -714,6 +714,7 @@ export interface SearchService { // @public export interface Segment { + pageNumber?: number; score: number; text: string; } diff --git a/src/models/searchservice/response/Segment.ts b/src/models/searchservice/response/Segment.ts index bc8c5c8a..3078a2d4 100644 --- a/src/models/searchservice/response/Segment.ts +++ b/src/models/searchservice/response/Segment.ts @@ -7,5 +7,7 @@ export interface Segment { /** The value of the segment as plain text. */ text: string, /** The similarity score of the segment from 0 to 1 */ - score: number + score: number, + /** The page number of the document that the segment came from. Populated only for pdf files. */ + pageNumber?: number } \ No newline at end of file