Skip to main content

Interface: SearchParams

Defined in: packages/core/src/data/strategies/SearchNativeFetchStrategy.ts:12

The EndpointParams supported by the SearchNativeFetchStrategy

Extends​

Indexable​

[k: string]: unknown

Properties​

_embed?​

optional _embed: boolean

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:17

The _embed param returned associated entities in the response

It's recommended to avoid additional requests to fetch data

Inherited from​

EndpointParams._embed


_fields?​

optional _fields: string[]

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:22

The _fields parameter is used to return only the specified fields in the response

Inherited from​

EndpointParams._fields


exclude?​

optional exclude: number[]

Defined in: packages/core/src/data/strategies/SearchNativeFetchStrategy.ts:47

Ensure result set excludes specific IDs.


include?​

optional include: number[]

Defined in: packages/core/src/data/strategies/SearchNativeFetchStrategy.ts:52

Limit result set to specific IDs.


lang?​

optional lang: string

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:29

The polylang ?lang parameter.

This is only used if the polylang integration is enabled

Inherited from​

EndpointParams.lang


optimizeYoastPayload?​

optional optimizeYoastPayload: boolean

Defined in: packages/core/src/data/strategies/AbstractFetchStrategy.ts:36

The custom parameter to optimize the Yoast payload.

This is only used if the YoastSEO integration is enabled

Inherited from​

EndpointParams.optimizeYoastPayload


page?​

optional page: number

Defined in: packages/core/src/data/strategies/SearchNativeFetchStrategy.ts:18

Current page of the collection.

Default​

1

per_page?​

optional per_page: number

Defined in: packages/core/src/data/strategies/SearchNativeFetchStrategy.ts:25

Maximum number of items to be returned in result set.

Default​

10

optional search: string

Defined in: packages/core/src/data/strategies/SearchNativeFetchStrategy.ts:30

Limit results to those matching a string.


subtype?​

optional subtype: string | string[]

Defined in: packages/core/src/data/strategies/SearchNativeFetchStrategy.ts:42

Limit results to items of one or more object subtypes.


type?​

optional type: "post" | "term" | "post-format"

Defined in: packages/core/src/data/strategies/SearchNativeFetchStrategy.ts:37

Limit results to items of an object type.

Default​

'post'