Product usage FAQ

Updated at:

System

What is OpenSearch?

OpenSearch is a cloud-based search service tailored for structured data. With the platform that we provide, you can easily obtain a high-quality, scalable, and customizable search service without having to deal with the technical details of search. All you need to do is complete the relevant configurations and upload your data. Then, you can obtain search results by using API operations. We also provide SDKs for typical programming languages. For the SDK languages that are supported, see the download center in the management console.

What benefits can OpenSearch bring to me?

OpenSearch is a cloud-based search service that is highly scalable. It automatically scales the required hardware resources based on your data volume, so you can have a search service without any hardware investment. The search feature also does not put any load on your existing servers. Fast, high-quality search results better meet the information needs of your users, which increases user stickiness, traffic, and popularity of your product. Ultimately, this brings considerable economic value to you.

How many search requests can I send?

Currently, no limit is imposed. Manually configure the value in the console based on your actual usage. Requests for very high QPS must be submitted and are manually reviewed. Submit such a request as early as possible. If the QPS is very high, the system makes internal adjustments automatically, which may take several days.

What is the latency of search requests?

The actual latency is greatly affected by the complexity of the query and the number of matched documents. Test with your own data based on your actual scenario.

How is OpenSearch billed?

For more information, see Billing overview. After the billing model was revised, two billing methods are available: the old method based on storage and QPS, and the new method based on logical computing units (LCUs). (Note: If you use the old billing method, the LCU consumption shown in monitoring is irrelevant to billing and can be used only as reference data for search performance.)

Process

What is an application and how do I create one?

An application is a collection of searchable documents that share the same application schema. You can define tables and field types for an application, configure search attributes, upload data, and obtain search results. You can create, manage, and delete applications in the console or by using Web API operations.

What is the purpose of "Index To" when I define an application schema?

When you query keywords in a query clause, you must specify the index to be queried, which is the index field defined by "Index To" in the application schema. An index field contains one or more source fields. After an index field is defined, the engine builds inverted lists that map query terms to documents during index building. During queries, documents can be quickly located based on query terms, which greatly improves query performance.

For example, a forum has two search requirements: 1. comprehensive search (title, content, and author); 2. title search. The source fields are title, body, and author. You can index title, body, and author to the default field, and index title to the title_search field. Then, query=default:'keyword' meets requirement 1, and query=title_searc:'keyword' meets requirement 2.

What is a template?

A template is an application container that we create for typical data on the Internet to further reduce your workload. It includes the application schema, sort methods, and other settings. You can view details of the currently available templates when you create an application. We will add more templates for you to choose from in the future.

Can I modify the application schema of a template after I select the template?

Yes. Go to Application Management > Details > Offline Change to make the change. For detailed steps, see Offline change

How do I upload data to an application?

If you use ApsaraDB RDS, MaxCompute (formerly ODPS), or PolarDB, you can configure the relevant instance information in the console to enable automatic synchronization. Other users can upload data by using the data upload API or the upload feature in the management console.

How many documents can I upload?

No upper limit is imposed on the number of documents uploaded to an application. You can configure the document capacity quota in the console. For details, see the Application Management -> Quotas and Billing section. As with peak QPS, requests for large capacity are manually reviewed. This quota affects billing, so configure it based on your actual needs.

How do I delete an application?

In the management tool, click the name of the index. On the index details page, click "Delete Application", and then confirm in the system prompt to complete the deletion.

How do I delete documents in an application?

You can delete specified documents by setting the delete operation through the SDK in the uploaded data. You can also delete specific documents on the Search Test page of the console.

How do I clear an application?

If you need to retain the application name, you must delete the documents in the application one by one to clear the index. If you do not need to retain the application name, you can create a new application and copy the relevant configurations to it. A standalone data clearing feature will be provided in the future. Currently, the Advanced Edition supports scheduled cleanup tasks that retain documents for 7 to 180 days.

Data import

Can OpenSearch be used with the Alibaba Cloud database service ApsaraDB RDS?

Yes. After you configure the RDS instance information in the data source of the application, operations on RDS are automatically synchronized to OpenSearch. (After the configuration is complete, you must import data and rebuild the index to import the current full data into the system.)

Which Alibaba Cloud products can be directly connected to OpenSearch?

Currently, ApsaraDB RDS, MaxCompute (formerly ODPS), and PolarDB are supported. More products will be integrated in the future.

What is the document format for uploads through the API or SDK?

Currently, the JSON format is supported. See the sample files provided on the template page or the data processing section of the API documentation.

What is the difference between the add and update commands?

If values are not specified for some fields in a document uploaded by using add or update, add overwrites those fields with default values, whereas update leaves them unchanged.

Search

What search features does OpenSearch provide?

OpenSearch supports search on basic types such as text and numbers, and provides query, filtering, sorting, statistics, and aggregation features. It also provides typical data templates, custom index schemas, custom sorting of search results, custom query analysis (such as synonyms and spelling correction), and drop-down suggestions.

How do I obtain all documents?

This is not supported. A search engine focuses on returning the best results in the shortest possible time, so no feature is provided to view all documents. OpenSearch limits the maximum number of returned results (for details, see the system limits). Even with paging, you can only page through the number of returned results indicated by viewtotal.

Why is an Array type returned as a string instead of an array in query results?

In search results, values of the Array type are separated by \t.

Can I specify the analysis method and dictionary in OpenSearch?

Text analysis is used in only two places: during index building and during queries. Currently, dictionaries are configured globally for the entire system, and user-defined dictionaries are not supported. However, OpenSearch supports multiple analysis methods, including custom analyzers. For details, see "Field types and analyzer types" in the "User Guide".

A document contains "\u5403\u996d\u4e86" ("have eaten"). Why is the document not returned when I search for "\u5403\u996d\u4e86\u5417" ("have you eaten?")? (Note: The Chinese characters in this example are shown as Unicode escape sequences. Decode them into the actual Chinese characters before you enter them in a real query.)

This is because, currently, a document is returned only if all terms produced by OpenSearch analysis are matched. The preceding query=default:'\u5403\u996d\u4e86\u5417' is equivalent to query=default:'\u5403\u996d' AND default:'\u4e86' AND default:'\u5417'. The document does not contain the term "\u5417", so the document is not retrieved.

In this case, you can configure the "term weight" feature of query analysis. This feature applies the RANK operation to less important terms to solve retrieval issues for long-tail queries. For example, the preceding query is automatically rewritten as query=default:'\u5403\u996d' RANK default:'\u4e86' RANK default:'\u5417'. As a result, the preceding document is retrieved and ranked ahead of documents that contain only "\u5403\u996d".

I searched for "mx" and "player", and a document contains "mxplayer". Why is the document not retrieved?

For English, the smallest analysis granularity is the word. "mxplayer" in the preceding document is treated as a single term, so searching for "mx", "player", or "mx player" cannot retrieve documents that contain "mxplayer".

Does OpenSearch support search in less common languages?

Currently, the system supports semantic analysis only for Chinese and English. Other languages that use spaces as delimiters, such as Portuguese and Russian, are supported for basic word matching, but not for semantics (phrases). Languages that do not use spaces as delimiters, such as Japanese and Korean, are not supported. Analyzers for Thai and Vietnamese are now available. For details, see Text analyzers.

How do I separate products from the same member in search results so that only the single most relevant product is displayed for each member, and then display the total number of entries?

You can combine the aggregate clause and the distinct clause. The distinct clause scatters results of the same category, and the aggregate clause collects statistics on results of the same category.

Is there a caching mechanism for searches?

Results returned for the same query within 5 minutes are cached. Caching is enabled by default and cannot be modified or disabled.

API and SDK

What is the endpoint for pushing data by using the SDK? OpenSearch is deployed in multiple regions, and each region has an independent API endpoint. For details, view the API endpoint in the application details.

Data uploaded by using the SDK returned OK, but why does the page show errors? How do I obtain the error messages?

A status of OK returned by the SDK only indicates that the system received the data. Errors that occur during subsequent data processing are displayed in the error logs of the application in the console. If data is uploaded successfully but cannot be found in searches, first check the information in the error logs, fix the issues, and then import the data again. Currently, no API operation is available to obtain error log information.

If your issue persists, submit a ticket.

FAQ about highlighting

What does fragment length mean?

Fragment length indicates the maximum length of the entire summary. Highlighting is applied only within the fragment length.

What does ... mean?

... is the separator between fragments. For example, if a field has a length of 1,000, the fragment length is 200, and there are three fragments, the three fragments are joined by .... Highlighting is applied only within fragments, and other content is not displayed.