Fluent builder for searching products in the catalogue. Configure it with a search query, an optional product library organisation, and an optional list of supplier organisations, then call search to fetch a page of matching products, count to get the total match count, or query to build a criteria for further use. Obtained by calling newProductSearchBuilder on the catalogManager service from server-side JavaScript.

Group: Builders


Methods

Returns: List<Product>

Runs the configured search and returns a page of matching products.

ParameterDescription
searchPropertiespaging and sorting options for the result page

count()

Returns: long

Runs the configured search and returns the total number of matching products, ignoring paging.

query()

Returns: KCriteria

Builds a KCriteria based on the current search builder parameters, for cases where the caller needs to stream or further filter the matching products rather than fetch a single page.

kSearchQuery(KSearchQuery s)

Returns: ProductSearchBuilder

Sets the parsed search query terms to filter products by.

ParameterDescription
sthe search query

prodLibOrg(Long s)

Returns: ProductSearchBuilder

Sets the ID of the product library organisation to search within, instead of the current organisation.

ParameterDescription
sthe ID of the product library organisation, or null to use the current organisation

suppliers(List<Organisation> s)

Returns: ProductSearchBuilder

Restricts the search to products from the given supplier organisations.

ParameterDescription
sthe supplier organisations to restrict the search to
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.