ProductSearchModel.getProductSearchHits()retrieves product hits from B2C Commerce ' sproduct search indexrather than performing direct product-database iteration. Search-index access is designed for scalable storefront product discovery because the index is optimized for search, refinement, sorting, and high-volume retrieval.
Salesforce ' s Script API explicitly recommends iteratingProductSearchHitobjects rather than loading Products directly from search results. The oldergetProducts()method is deprecated because loading full Product objects for every result is significantly more expensive from a performance perspective; Salesforce recommendsgetProductSearchHits()instead.
ProductAvailabilityModel.isOrderable()determines the orderability of a particular product within its inventory/availability context; it is not a general indexed search mechanism.ProductIndexModel.getOrderableProductsOnly()is not the appropriate supported method represented by the current Product Search API.
A common efficient storefront pattern is to configure aProductSearchModel, execute the search, iterate its search hits, and load only the product data actually needed for the current page.
Study Guide reference:Application Development — ProductSearchModel, ProductSearchHit, search indexes, scalable product retrieval, and storefront search performance.
===============