Elasticsearch API
Elasticsearch API
Section titled “Elasticsearch API”PHP client functions for search operations.
Search Functions
Section titled “Search Functions”elasticsearch_search($query, $filters, $page, $per_page)
Section titled “elasticsearch_search($query, $filters, $page, $per_page)”Perform full-text search with filters.
elasticsearch_aggregations()
Section titled “elasticsearch_aggregations()”Get faceted search aggregations.
elasticsearch_suggestions($prefix)
Section titled “elasticsearch_suggestions($prefix)”Get autocomplete suggestions.
Indexing Functions
Section titled “Indexing Functions”bulk_index_products($products)
Section titled “bulk_index_products($products)”Index multiple products efficiently.
index_single_product($product)
Section titled “index_single_product($product)”Index one product.
delete_product_from_index($product_id)
Section titled “delete_product_from_index($product_id)”Remove product from index.
Utility Functions
Section titled “Utility Functions”get_elasticsearch_client()
Section titled “get_elasticsearch_client()”Get Elasticsearch client instance.
check_elasticsearch_health()
Section titled “check_elasticsearch_health()”Verify Elasticsearch connection.
Next Steps
Section titled “Next Steps”- Elasticsearch System - Search implementation
- Search Features - Search UI