System-related FAQ
Q: What is OpenSearch?
OpenSearch is a cloud service that provides tailored search solutions for you to process structured data. The OpenSearch console allows you to develop high-quality, scalable, and customizable search services without the need to concern about technical details. After you complete the required configurations and upload data to OpenSearch, you can call the OpenSearch API to search data. OpenSearch also provides SDKs for typical programming languages. For more information, see the SDK overview topic.
Q: What are the benefits of OpenSearch?
As a highly scalable search service that is hosted on Alibaba Cloud, OpenSearch automatically scales out hardware resources as your business data grows. You can use this search service without the need to invest in hardware. The search feature of OpenSearch does not place pressure on your existing servers. OpenSearch delivers high-quality search results in an efficient manner to help you better meet the needs of your users. This increases the user stickiness, exposure, and popularity of your service, and eventually brings you considerable profits.
Q: How many search requests can I send?
The number of search requests that can be sent is not limited. You can set a quota in the OpenSearch console based on your business requirements. If your service requires a large number of queries per second (QPS), submit a ticket for approval. We recommend that you submit the ticket in advance. Otherwise, OpenSearch automatically adjusts resources to handle these queries, which may take a few days.
Q: How much is the latency of a search request?
The latency of a search request largely depends on the complexity of the search query and the number of matched documents. You can test the latency based on your business requirements.
Q: How is OpenSearch billed?
For information about the billing methods of OpenSearch, see Overview. OpenSearch supports two billing methods, one of which is based on storage and QPS and the other is based on logical computing units (LCUs). If you choose the billing method that is based on storage and QPS, the monitored data about LCU consumption does not apply to billing. You can use the data to evaluate search performance.
Procedure-related FAQ
Q: What is an application? How do I create an application?
An application is a collection of searchable documents with the same schema. When you create an application, you must define data tables and field types, configure search properties, and then upload data. Then, you can search for data from the application. You can create, manage, and delete applications in the OpenSearch console or by calling the OpenSearch API.
Q: Why do I need to build indexes when I define the schema of an application?
You must specify indexes when you use the query clause to search data based on keywords. An index refers to an index field that you specify when you create the schema of an application. An index field is based on one or more source fields. If you have specified index fields, OpenSearch builds inverted indexes based on search queries to help retrieve documents in an efficient manner. This improves search performance.
For example, a forum requires a comprehensive search feature based on the title, body, and author, and a simple search feature based on only the title. The involved source fields are title, body, and author. You can build two indexes to meet the search requirements of the forum. One is between the title, body, and author source fields and the default field in OpenSearch. Another is between the title source field and the title_search field in OpenSearch. This way, you can use the query=default:'keyword' clause to implement the comprehensive search, and query=title_search:'keyword' to implement the title-based search.
Q: What is a template?
Templates are application containers that contain application configurations, such as schemas and sorting methods. OpenSearch provides templates based on typical data on the Internet to reduce your workloads. You can view the details of these templates when you create an application in the OpenSearch console. More templates will soon be available.
Q: Am I able to modify the schema of an application that is created based on a template?
Yes, you can modify the schema of an application that is created based on a template by performing the following operations in the OpenSearch console: Go to the details page of the application and click Modify Offline Application. For more information, see Perform offline changes.
Q: How do I upload data to an application?
If your data source is an ApsaraDB RDS instance, a MaxCompute project, or a PolarDB instance, configure the information about the data source in the OpenSearch console. Then, the source data is automatically synchronized to OpenSearch. If you use another type of data source, you can upload data by calling the OpenSearch API or using the upload feature in the OpenSearch console.
Q: How many documents can I upload to an application?
The number of documents that can be uploaded to an application is not limited. You can set the document quota of an application in the OpenSearch console based on your business requirements. For more information, see Change the configurations of an instance. If you want to upload a large number of documents to an application at a time, submit a ticket for approval. This is similar to submitting a ticket to handle a large number of QPS. The higher the document quota is, the more the expenses are. We recommend that you set the document quota of an application based on your business requirements.
Q: How do I delete an application?
Log on to the OpenSearch console, go to the details page of the application that you want to delete, and then click Delete Application. In the dialog box that appears, confirm the deletion.
Q: How do I delete a document in an application?
To delete a document in an application, you can execute the DELETE statement by using an OpenSearch SDK. You can also delete a document on the Search Test page in the OpenSearch console.
Q: How do I clear an application?
If you want to reserve the application name, delete the documents in the application one by one to clear the application. If you do not want to reserve the application name, create another application and copy the configurations of the application to be cleared to the created application. OpenSearch will soon allow you to directly clear applications. OpenSearch applications of the advanced edition support scheduled document clearing. You can retain documents for 7 to 180 days before they are automatically cleared.
FAQ about data import
Q: Am I able to import data from an ApsaraDB RDS instance to OpenSearch?
Yes, you can import data from an ApsaraDB RDS instance to OpenSearch by performing the following operations: Configure your ApsaraDB RDS instance as the data source of an application. Then, import data and rebuild indexes so that all data in the ApsaraDB RDS instance is imported to OpenSearch. After that, data updates in the ApsaraDB RDS instance will be automatically synchronized to OpenSearch.
Q: Which Alibaba Cloud services can be used as data sources for OpenSearch applications?
OpenSearch supports ApsaraDB RDS instances, MaxCompute projects, and PolarDB instances as data sources. More services will soon be supported.
Q: What format is supported when I call the OpenSearch API or use an OpenSearch SDK to upload documents?
Only the JSON format is supported. For more information, see the templates that are provided in the OpenSearch console or see Process data.
Q: What is the difference between the ADD statement and the UPDATE statement?
If the ADD statement contains a field with no specified value, OpenSearch assigns the default value to the field. If the UPDATE statement contains a field with no specified value, OpenSearch does not assign a value to the field.
Search-related FAQ
Q: What types of searches does OpenSearch support?
OpenSearch supports basic searches, such as searches based on texts and numbers, and provides a variety of features such as query, filtering, sorting, statistics, and aggregation. OpenSearch also provides templates based on typical data on the Internet. In addition, OpenSearch supports custom indexes, custom sorting methods of search results, and drop-down suggestions. You can also customize the search analysis feature. For example, you can configure synonyms and intelligent correction for this feature.
Q: Am I able to obtain all documents of an application?
You cannot obtain all documents of an application. As a search engine, OpenSearch aims to retrieve the most matched results as soon as possible. OpenSearch does not allow you to obtain all documents of an application. OpenSearch returns only a limited number of documents for each search. For more information, see Limits. If you want to configure paging for search results, set the viewtotal parameter in the response.
Q: Why is an array displayed as a string in search results?
In OpenSearch, the elements of an array are separated by the delimiter (\t).
Q: Does OpenSearch support custom analyzers and custom dictionaries?
In OpenSearch, analysis is required only in indexing and searching. All dictionaries in OpenSearch share the same set of configurations. OpenSearch does not support custom dictionaries. However, OpenSearch supports multiple analysis methods and allows you to customize analysis methods. For more information, see Fields and analyzers.
Q: Why am I unable to obtain the document that contains "mxplayer" by using the search queries "mx" and "player"?
The analysis feature of OpenSearch supports word-level analysis of search queries in English. The word "mxplayer" in the document is viewed as one word. Therefore, you cannot obtain the document that contains "mxplayer" by using the search queries "mx", "player", or "mx player".
Q: Does OpenSearch support search queries in languages other than Chinese and English?
OpenSearch supports semantic-based analysis only for search queries in Chinese and English. For search queries in other languages, such as Portuguese and Russian, that use spaces as delimiters, OpenSearch supports basic word matching but not semantic-based analysis. OpenSearch does not support search queries in languages that do not use spaces as delimiters, such as Japanese and Korean. OpenSearch provides general analyzers for Thai and Vietnamese. For more information, see Text analyzers.
Q: How do I make OpenSearch display the most relative commodity from each store and the total number of matched commodities in this store?
You can use the aggregate and distinct clauses. The distinct clause classifies search results into distinct types. The aggregate clause aggregates the results of the same type.
Q: Does OpenSearch support search result caching?
The returned results of the same query within 5 minutes are cached. By default, the search result caching feature is enabled. You cannot disable the feature or modify its configurations.
FAQ about OpenSearch API and OpenSearch SDKs
Q: What is the endpoint of the OpenSearch API? The OpenSearch service is deployed in multiple regions and provides dedicated endpoints of the OpenSearch API for each region. You can go to the details page of an application to view the endpoints of the OpenSearch API.
Q: I used an OpenSearch SDK to upload data and the status OK was returned in the response. Why did an error occur when I used the OpenSearch console? How do I obtain the error message?
The status OK in the response only indicates that OpenSearch received the data. However, errors may occur during data processing. These errors are recorded in error logs in the OpenSearch console. If you failed to query data that has been uploaded, view the error logs, modify the faulty configurations, and then reimport the data. OpenSearch does not provide an API operation for you to query error messages.
If you have other questions, submit a ticket.