All Products
Search
Document Center

FAQ

Last Updated: Sep 23, 2021

System

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.

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 as needed. 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 as needed.

Q: What is the billing method of OpenSearch?

For the information about the billing method 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

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. After that, 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, content, 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 content 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: Can I 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 Offline Change. 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. After that, 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 applications that can be uploaded to an application is not limited. You can set the document quota of an application in the OpenSearch console as needed. For more information, see Instance changes. 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 actual needs.

Q: How do I delete an application?

You can perform the following operations to delete an application in the OpenSearch console: On the Applications page, choose More > Delete in the Actions column of the application that you want to delete and confirm the delete operation in the message that appears.

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 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 specify to retain documents for 7 to 180 days before they are automatically cleared.

Data import

Q: Can I 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 in the OpenSearch console: 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 you use the OpenSearch API and 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 the "Process data" topic.

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

Q: What types of searches does OpenSearch support?

OpenSearch supports basic searches, such as the 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 "吃饭了" by using the search query "吃饭了吗"?

After OpenSearch analyzes a search query, OpenSearch retrieves only the documents that contain all the terms after analysis. In this example, query=default:'吃饭了吗' is equivalent to query=default:'吃饭' AND default:'了' AND default:'吗'. The document does not contain the term "吗". Therefore, the document is not retrieved.

In this case, you can specify term weights for search analysis. Then, OpenSearch calls the RANK function for the terms with low weights. This copes with long-tail searches. For example, after you specify term weights, OpenSearch rewrites query=default:'吃饭了吗' as query=default:'吃饭' RANK default:'了' RANK default:'吗'. This way, the document that contains "吃饭了" can be retrieved and ranked before the documents that contain only "吃饭".

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.

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.

Application migration and the new advanced edition

Q: Why do I have two applications with the same name? Am I charged for both of them?

This occurs when OpenSearch migrates the data of an application of the old advanced edition to an application of the new advanced edition. In April 2018, the OpenSearch team sent text messages, internal messages, and emails to inform that the old advanced edition will be phased out. We recommend that you migrate the data of applications of the old advanced edition to applications of the new advanced edition. OpenSearch may automatically migrate the data of an application of the old advanced edition to an application of the new advanced edition. In this case, two applications with the same name appear in the OpenSearch console even if you perform no operations. You are not charged for the migration. OpenSearch charges fees based on only one of the two applications.

Q: Why do I need to update my OpenSearch applications to the new advanced edition?

The new advanced edition delivers a higher speed in both full and real-time data processing than the old advanced edition. The old advanced edition will be phased out. We recommend that you update your applications to the new advanced edition.

Q: How do I update my OpenSearch application to the new advanced edition?

In the OpenSearch console, find the application that you want to update and choose Manage > Basic Information in the Actions column. On the details page of the application, you can update the application. If you want to update a group of applications at a time, you must specify the name of the application group and confirm the operation.

Q: Why does an application of the new advanced edition have two versions? Will the second version be deleted?

The new advanced edition and the standard edition support switching between multiple application versions. After you configure scheduled reindexing, manually rebuild indexes, or modify the schema for an application, a new version of the application is created. The two versions of the application coexist in the OpenSearch console.

After a new version of an application is created:

  • You can publish the new version in the online environment. By default, the offline old version is retained for eight hours before it is automatically deleted. You can also switch back to the old version by publishing the old version in the online environment. By default, the offline new version is retained also for eight hours.

  • A deleted application version cannot be recovered.

Application changes

Q: Why am I unable to change the specifications of an application?

Applications in the old advanced edition, which provide the drop-down suggestions feature, do not support specification changes. Exercise caution when you change the billing method for an application of the old advanced edition. Other editions support specification changes.

Q: How do I change the billing method of an application?

To change the billing method of an application, go to the Applications page in the OpenSearch console and click the name of the application. On the page that appears, click Scale-out in the upper-right corner.Note: The application must have only one version.

Q: How do I view the information about the quotas and billing of an application? Why am I unable to find the information about the storage and QPS quotas of an application in the OpenSearch console?

To view the quotas of an application in a region that supports the new billing method, go to the Applications page in the OpenSearch console and click the name of the application. Then, you can check the specifications of the application on the page that appears. To view information such as storage usage and QPS, click Cloud Monitor in the upper-right corner. You can also configure initiative alerts for your OpenSearch applications.

OpenSearch API and OpenSearch SDK

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 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.