Skip to content

Commit

Permalink
make raw data support an array
Browse files Browse the repository at this point in the history
  • Loading branch information
cea2aj committed Sep 29, 2023
1 parent 17f2277 commit 55b222b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/search-core.result.md
Expand Up @@ -27,7 +27,7 @@ export interface Result<T = Record<string, unknown>>
| [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
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[];
```
2 changes: 1 addition & 1 deletion etc/search-core.api.md
Expand Up @@ -608,7 +608,7 @@ export interface Result<T = Record<string, unknown>> {
index?: number;
link?: string;
name?: string;
rawData: T;
rawData: T | T[];
segment?: Segment;
source: Source;
}
Expand Down
4 changes: 2 additions & 2 deletions src/models/searchservice/response/Result.ts
Expand Up @@ -9,8 +9,8 @@ import { DocumentResult } from './DocumentResult';
* @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

0 comments on commit 55b222b

Please sign in to comment.