FAQ
This topic summarizes FAQ and troubleshooting methods for the PolarDB-X intelligent search (Search engine), covering scenarios such as connection, network, index, query, and O&M.
Connection and network
Q: A Connection refused error occurs when I connect to the Search engine.
Possible causes and solutions:
-
The IP address of the client environment is not added to the whitelist. Add it in the console under Access Configuration.
-
The wrong port is used. Confirm that port 9200 is used.
-
The Search engine is in an abnormal state. In the console, check that the Search engine status and the node status are Running.
-
The VPC network is unreachable. Confirm that the client environment and the Search engine are in the same VPC, or that public access is configured.
Q: A Connection timeout error occurs.
-
Verify network reachability:
telnet <Search engine endpoint> 9200. -
If you use a public endpoint, confirm that the public IP address of the local machine is added to the whitelist.
-
Check whether the security group or firewall rules allow port 9200.
Q: A 401 Unauthorized error occurs.
Authentication failed. Check that the username and password are correct, and that the -u "username:password" format in the curl command is correct. If the password contains special characters, escape them properly.
Q: Dashboards is not accessible.
-
Confirm that you use the dedicated Dashboards endpoint (not the API endpoint).
-
Confirm that the browser can access the network (public network or VPN).
-
Clear the browser cache and try again.
Q: SSL certificate verification fails.
During development and testing, use the -k parameter to skip certificate verification (curl), or set verify_certs=False (Python). In production, configure a valid CA certificate.
Index and data
Q: A resource_already_exists_exception error occurs when I create an index.
The index already exists. To rebuild it, delete it first and then create it again:
curl -XDELETE "http://<Search engine endpoint>:<port>/my-index" -u "<username>:<password>" -k
curl -XPUT "http://<Search engine endpoint>:<port>/my-index" -u "<username>:<password>" -k -H "Content-Type: application/json" -d '{}'
The empty JSON object {} creates an index using the default mapping and is syntactically valid. To customize the mapping, add the mapping definition inside the braces.
Q: I cannot search for data after writing it.
Data becomes searchable only after a refresh. The default refresh_interval is 1 second. Wait 1 second and retry, or manually trigger a refresh with POST /my-index/_refresh.
Q: A 429 Too Many Requests error occurs during bulk writes.
The Search engine is under too much write pressure. Recommendations: reduce the number of concurrent write threads, reduce the size of each _bulk request, implement exponential backoff retries, and scale out if needed.
Q: What can I do if I set the wrong mapping field type?
The type of an existing field cannot be modified. Recommended switching procedure:
-
Create a new index with the correct mapping.
-
Use the
_reindexAPI to migrate data. -
Switch to the new index by using an alias.
Q: What can I do if the cluster status is yellow?
A yellow status indicates that all primary shards are healthy but some replicas are unassigned.
-
Common causes: the number of nodes is less than the number of replicas plus 1, or the disk space is insufficient (above the 85% watermark).
-
Solutions: add nodes, reduce the number of replicas, or clean up disk space.
curl -XGET "http://<Search engine endpoint>:<port>/_cluster/allocation/explain?pretty" -u "<username>:<password>" -k
Q: What can I do if the cluster status is red?
A red status indicates that unassigned primary shards exist and some data is inaccessible. Emergency actions:
-
Check node status (
GET _cat/nodes?v). -
View the affected indexes (
GET _cat/indices?v&health=red). -
Wait for the nodes to recover. Shards recover automatically.
Query and performance
Q: The search results do not match my expectations.
-
Use the
_analyzeAPI to check whether the tokenization results are as expected. -
Use the
explainparameter to view scoring details. -
Check the
analyzerconfiguration (index-time vs search-time). -
Confirm that the query type is correct (
matchvstermvsmatch_phrase).
Q: Query responses become slow.
-
Check cluster resource usage (CPU, memory, disk).
-
Check whether deep pagination queries exist (from > 10000).
-
Check whether expensive queries are used (leading wildcards or complex scripts).
-
Check whether a single shard is too large (> 50 GB).
-
Check whether large concurrent writes are affecting read performance.
Q: Vector search results are inaccurate.
-
The embedding model does not match the query intent. Try a better model.
-
The
kvalue is too small. Increase it. -
The
ef_searchvalue is too small. Increase it. -
The distance metric is inappropriate. Confirm that
space_typematches the model output. -
The vector dimensions are inconsistent. Confirm that the query vector dimensions match the index definition.
Compatibility
Q: Can I use an Elasticsearch client to connect?
The Elasticsearch 7.x High Level REST Client can connect in a compatible mode (compatibility mode must be configured). Use the official OpenSearch client for the best compatibility and feature support.
Q: Can Kibana connect to the Search engine?
Not directly supported. Use OpenSearch Dashboards, which is similar to Kibana and fully compatible with the Search engine.
Q: Are SQL queries supported?
Yes. OpenSearch provides a built-in SQL plug-in. Execute SQL queries by using the _plugins/_sql endpoint.
curl -XPOST "http://<Search engine endpoint>:<port>/_plugins/_sql" \
-u "<username>:<password>" -k \
-H "Content-Type: application/json" \
-d '{ "query": "SELECT * FROM products WHERE price > 100 LIMIT 10" }'
The SQL plug-in syntax differs from standard MySQL SQL. Use DSL for complex queries.
Q: Which Elasticsearch plug-ins or features are not supported?
Features that are currently restricted or not yet available:
-
Write operations of the Security API (role, user, and permission configuration).
-
Creation of snapshot repositories, manual snapshots, snapshot restoration, and SM policy modification (standard accounts have read-only query access).
-
Cross-Cluster Replication (the plug-in is installed but disabled externally by default).
-
Alerting, Anomaly Detection, ML Commons, Notifications, and Neural Search plug-ins are built in and available.
O&M
Q: What can I do if the Search engine disk is almost full?
-
Delete unnecessary historical indexes.
-
Use an ISM policy to automatically clean up expired indexes.
-
Reduce the number of index replicas to free up space.
-
Run
force_mergeto merge segments and reduce disk usage. -
Scale up storage capacity.
Q: How can I clean up historical indexes?
curl -XDELETE "http://<Search engine endpoint>:<port>/logs-2025.01.01" -u "<username>:<password>" -k
curl -XDELETE "http://<Search engine endpoint>:<port>/logs-2025.01.*" -u "<username>:<password>" -k
Configure an ISM policy for automatic cleanup. For more information, see Index State Management (ISM).
Q: How can I view the resource usage of the Search engine?
curl -XGET "http://<Search engine endpoint>:<port>/_cat/nodes?v&h=name,heap.percent,ram.percent,cpu,disk.used_percent" \
-u "<username>:<password>" -k
curl -XGET "http://<Search engine endpoint>:<port>/_cat/indices?v&s=store.size:desc" \
-u "<username>:<password>" -k