Tablestore provides match query and match phrase query to support the full-text search feature. Full-text search matches data based on the tokens and can highlight the matched keywords in the query results. This topic describes the data query and data processing features that are supported when you use Tablestore SDK for Java to perform full-text search.
Background information
When you create a search index, you can specify the tokenization method for Text fields. The default tokenization method is single-word tokenization. For more information, see Tokenization.
Data query
The following table describes the data query features provided by full-text search.
Feature | Description | Scenario |
You can use match query to search for data that contains a specific keyword in a table based on approximate matches. Tablestore tokenizes the values in Text fields and the keywords that you use to perform match queries based on the tokenization method that you specify. This way, Tablestore can perform match queries based on the tokens. | Match query is suitable for scenarios, such as big data analytics, content search, knowledge management, social media analysis, log analysis, intelligent Q&A systems, and compliance review. | |
You can use match phrase query to search for data that contains a specific keyword in which the tokens are arranged in a specific order based on approximate matches. A row meets the query conditions only when the order and positions of the tokens in the row match the order and positions of the tokens that are contained in the tokenized keyword. | Match phrase query is suitable for scenarios, such as big data analytics, content search, and intelligent recommendation. |
Data processing
The following table describes the data processing features involved in full-text search.
Feature | Description |
You can use the highlight feature to highlight the text that matches or relates to the query strings in the query results. This helps improve information retrieval efficiency by allowing users to quickly locate the query strings. |