Enterprise-gradeElasticSearch API Gateway
Transparent proxy, intelligent query protection, unified search interface, cross-cluster support, monitoring & logging
Server Address: http://localhost:8000
API Categories
ElasticProxy provides four types of API interfaces, supporting complete solutions from basic proxy to enterprise-level features
Core Proxy API
v1.0+Fully compatible Elasticsearch transparent proxy supporting all HTTP methods and query protection
/healthService health check
curl -X GET "http://localhost:8000/health"/*Transparently proxy all Elasticsearch API requests
curl -X POST "http://localhost:8000/test-index/_search" -H "Content-Type: application/json" -d '{"query": {"match_all": {}}}'/{cluster}:{index}/_searchCross-cluster search (CCS) support
curl -X POST "http://localhost:8000/logs:test-index/_search" -H "Content-Type: application/json" -d '{"query": {"match": {"message": "error"}}}'/_cat/indices?vCat API automatic format handling
curl -X GET "http://localhost:8000/_cat/indices?v"/{index}/_search?scroll=1mScroll search support
curl -X POST "http://localhost:8000/test-index/_search?scroll=1m" -H "Content-Type: application/json" -d '{"query": {"match_all": {}}, "size": 1000}'Unified Search API
v1.3.6+Intelligent query type recognition, index access control, query caching and other enterprise-level features
/*/_unified_searchUnified search interface (supports exact match, range query, text search)
curl -X POST "http://localhost:8000/user-logs/_unified_search" -H "Content-Type: application/json" -d '{"conditions": [{"key": "status", "value": "ERROR"}], "relationshipType": "AND"}'/{cluster}:{index}/_unified_searchCross-cluster unified search
curl -X POST "http://localhost:8000/logs:apache-*/_unified_search" -H "Content-Type: application/json" -d '{"conditions": [{"key": "status", "value": "200"}]}'Management API
v1.0+System management, monitoring, configuration hot reload and cache control interfaces
/actuator/healthDetailed health check
curl -X GET "http://localhost:8000/actuator/health"/actuator/refreshConfiguration hot reload
curl -X POST "http://localhost:8000/actuator/refresh"/actuator/prometheusPrometheus monitoring metrics
curl -X GET "http://localhost:8000/actuator/prometheus"Unified Search Management API
v1.3.7+Performance metrics collection, cache management and other advanced features
/actuator/unified-search/metricsGet unified search performance metrics summary
curl -X GET "http://localhost:8000/actuator/unified-search/metrics"/actuator/unified-search/metrics/detailedGet detailed performance metrics
curl -X GET "http://localhost:8000/actuator/unified-search/metrics/detailed"/actuator/unified-search/cache/statsQuery cache statistics
curl -X GET "http://localhost:8000/actuator/unified-search/cache/stats"/actuator/unified-search/cache/clearClear query cache
curl -X POST "http://localhost:8000/actuator/unified-search/cache/clear"Unified Search Interface Guide
Intelligent query type recognition, automatic parameter validation, enterprise feature integration
Query Type Auto-Recognition Rules
Exact Match Query
Field name in exactMatchFields configuration list, or value is pure number/simple identifier
corpId: "FUND002"Range Query
Field name in rangeFields configuration list, and value contains comma-separated format
bizDate: "2023-01-01,2023-12-31"Text Search
Other cases default to text search, supports tokenization and relevance scoring
description: "fund investment"Business Rule Limits
Maximum of 50 query conditions per single query
Prevent performance issues caused by deep pagination
Only supports AND and OR condition relationship types
Maximum execution time per single query (configurable)
Restricted by index access control list
API Usage Examples
Exact Match Query
termTerm query - field name in exact match list, or value is pure number/simple identifier
Range Query
rangeRange query - field name in range field list, value contains comma-separated format "start,end"
Text Search
matchMatch query - other cases default to text search, supports tokenization and relevance scoring
Multi-condition Boolean Query
boolAND/OR relationship types, supports mixed query types
Cross-cluster Search
cross_clusterSupports CCS alias routing for cross-cluster queries
Response Format Description
Standard field description of unified search API response
codeHTTP status code string ("200"/"400"/"403"/"404"/"500")
messageResponse message ("Success" for success, specific error message for errors)
dataDocument array containing actual data of query results
totalTotal record count
tookQuery execution time (milliseconds)
Security & Rate Limiting
Enterprise-level security protection and access control mechanisms
IP Access Control
Supports whitelist and blacklist, CIDR format network segment control
Rate Limiting
IP-based request frequency limiting
Query Protection
7 intelligent protection rules to prevent dangerous queries
Monitoring & Logging
Complete request tracking and performance monitoring system
Request Logs
Elasticsearch monitoring index: elastic-proxy-logs-YYYY-MM-DD
Main Fields
Unified Search Logs
Elasticsearch monitoring index: unified-search-logs-YYYY-MM-DD
Main Fields
v1.3.7 Enhanced Monitoring Features
Professional-grade performance metrics collection based on Micrometer
Performance Metrics
Request volume, success rate, response time
Cache Monitoring
Hit rate, size, cleanup statistics
Query Audit
Detailed query logging
System Monitoring
JVM, connection pool, ES cluster status
Error Code Reference
HTTP status codes, error reasons and response examples
Success
Request successful
{"code":"200","message":"Success","description":"Request successful"}Bad Request
Request parameter validation failed
{"code":"400","message":"Bad Request","description":"Request parameter validation failed"}Forbidden
IP not in whitelist, insufficient index access permission
{"code":"403","message":"Forbidden","description":"IP not in whitelist, insufficient index access permission"}Not Found
Resource does not exist
{"code":"404","message":"Not Found","description":"Resource does not exist"}Too Many Requests
Request too frequent
{"code":"429","message":"Too Many Requests","description":"Request too frequent"}Internal Server Error
Internal server error
{"code":"500","message":"Internal Server Error","description":"Internal server error"}π v1.3.7 Major Features
Performance metrics collection, query logging, strict type detection - Enterprise monitoring system
π Performance Metrics Collection
Professional-grade performance monitoring based on Micrometer, comprehensive coverage of request volume, success rate, response time
π Query Logging
Detailed unified search query audit, supports query analysis, cache monitoring, execution time statistics
π― Strict Type Detection
Intelligent query type inference strategy, supports automatic recognition of exact match, range query, text search
π Index Access Control v1.3.6
Fine-grained index access permission control, supports exact match, wildcard match, cross-cluster index format
β‘ Query Result Caching v1.3.6
Significantly improves query performance (80-95% response time improvement), reduces ES cluster load (60-80%)