Log in
Model

SearchClient

Magento\OpenSearch\Model\SearchClient

What it does

This class serves as the main client interface for interacting with OpenSearch in Magento 2.

Developers use it to perform search operations, manage indices (create, delete, check existence), handle index mappings, execute bulk queries, and manage aliases.

It abstracts the OpenSearch PHP client and provides Magento-specific functionality for search engine operations.

Public Methods

  • suggest()
  • getOpenSearchClient()
  • ping()
  • testConnection()
  • bulkQuery()
  • createIndex()
  • putIndexSettings()
  • deleteIndex()
  • isEmptyIndex()
  • updateAlias()
  • indexExists()
  • existsAlias()
  • getAlias()
  • addFieldsMapping()
  • query()
  • getMapping()
  • deleteMapping()
  • applyFieldsMappingPreprocessors()
  • openPointInTime()
  • closePointInTime()