Skip to content

Commit 9d723ac

Browse files
authored
Merge pull request #196929 from HeidiSteen/heidist-fix
[azure search] Added a text translation H2 section to language support article
2 parents 46fc549 + 7fba335 commit 9d723ac

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

articles/search/search-language-support.md

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ author: HeidiSteen
88
ms.author: heidist
99
ms.service: cognitive-search
1010
ms.topic: conceptual
11-
ms.date: 04/21/2022
11+
ms.date: 05/03/2022
1212
---
1313

1414
# Create an index for multiple languages in Azure Cognitive Search
@@ -19,12 +19,30 @@ A multilingual search application supports searching over and retrieving results
1919

2020
+ On the query request, set the `searchFields` parameter to scope full text search to specific fields, and then use `select` to return just those fields that have compatible content.
2121

22-
The success of this technique hinges on the integrity of field content. By itself, Azure Cognitive Search does not translate strings or perform language detection as part of query execution. It's up to you to make sure that fields contain the strings you expect.
22+
The success of this technique hinges on the integrity of field content. By itself, Azure Cognitive Search doesn't translate strings or perform language detection as part of query execution. It's up to you to make sure that fields contain the strings you expect.
23+
24+
## Need text translation?
25+
26+
This article assumes you have translated strings in place. If that's not the case, you can attach Cognitive Services to an [enrichment pipeline](cognitive-search-concept-intro.md), invoking text translation during data ingestion. Text translation takes a dependency on the indexer feature and Cognitive Services, but all setup is done within Azure Cognitive Search.
27+
28+
To add text translation, follow these steps:
29+
30+
1. Verify your content is in a [supported data source](search-indexer-overview.md#supported-data-sources).
31+
32+
1. [Create a data source](search-howto-create-indexers.md#prepare-external-data) that points to your content.
33+
34+
1. [Create a skillset](cognitive-search-defining-skillset.md) that includes the [Text Translation skill](cognitive-search-skill-text-translation.md).
35+
36+
The Text Translation skill takes a single string as input. If you have multiple fields, can create a skillset that calls Text Translation multiple times, once for each field. Alternatively, you can use the [Text Merger skill](cognitive-search-skill-textmerger.md) to consolidate the content of multiple fields into one long string.
37+
38+
1. Create an index that includes fields for translated strings. Most of this article covers index design and field definitions for indexing and querying multi-language content.
39+
40+
1. [Attach a multi-region Cognitive Services resource](cognitive-search-attach-cognitive-services.md) to your skillset.
41+
42+
1. [Create and run the indexer](search-howto-create-indexers.md), and then apply the guidance in this article to query just the fields of interest.
2343

2444
> [!TIP]
25-
> If text translation is a requirement, you can [create a skillset](cognitive-search-defining-skillset.md) that adds [text translation](cognitive-search-skill-text-translation.md) to the indexing pipeline. This approach requires [using an indexer](search-howto-create-indexers.md) and [attaching a Cognitive Services resource](cognitive-search-attach-cognitive-services.md).
26-
>
27-
> Text translation is built into the [Import data wizard](cognitive-search-quickstart-blob.md). If you have a [supported data source](search-indexer-overview.md#supported-data-sources) with text you'd like to translate, you can step through the wizard to try out the language detection and translation functionality.
45+
> Text translation is built into the [Import data wizard](cognitive-search-quickstart-blob.md). If you have a [supported data source](search-indexer-overview.md#supported-data-sources) with text you'd like to translate, you can step through the wizard to try out the language detection and translation functionality before writing any code.
2846
2947
## Define fields for content in different languages
3048

@@ -54,7 +72,7 @@ The "analyzer" property on a field definition is used to set the [language analy
5472

5573
## Build and load an index
5674

57-
An intermediate (and perhaps obvious) step is that you have to [build and populate the index](search-get-started-dotnet.md) before formulating a query. We mention this step here for completeness. One way to determine index availability is by checking the indexes list in the [portal](https://portal.azure.com).
75+
An intermediate step is [building and populating the index](search-get-started-dotnet.md) before formulating a query. We mention this step here for completeness. One way to determine index availability is by checking the indexes list in the [portal](https://portal.azure.com).
5876

5977
## Constrain the query and trim results
6078

@@ -67,7 +85,7 @@ Parameters on the query are used to limit search to specific fields and then tri
6785

6886
Given a goal of constraining search to fields containing French strings, you would use **searchFields** to target the query at fields containing strings in that language.
6987

70-
Specifying the analyzer on a query request is not necessary. A language analyzer on the field definition will always be used during query processing. For queries that specify multiple fields invoking different language analyzers, the terms or phrases will be processed independently by the assigned analyzers for each field.
88+
Specifying the analyzer on a query request isn't necessary. A language analyzer on the field definition will always be used during query processing. For queries that specify multiple fields invoking different language analyzers, the terms or phrases will be processed independently by the assigned analyzers for each field.
7189

7290
By default, a search returns all fields that are marked as retrievable. As such, you might want to exclude fields that don't conform to the language-specific search experience you want to provide. Specifically, if you limited search to a field with French strings, you probably want to exclude fields with English strings from your results. Using the **$select** query parameter gives you control over which fields are returned to the calling application.
7391

@@ -111,7 +129,7 @@ private static void RunQueries(SearchClient srchclient)
111129

112130
## Boost language-specific fields
113131

114-
Sometimes the language of the agent issuing a query is not known, in which case the query can be issued against all fields simultaneously. IA preference for results in a certain language can be defined using [scoring profiles](index-add-scoring-profiles.md). In the example below, matches found in the description in English will be scored higher relative to matches in other languages:
132+
Sometimes the language of the agent issuing a query isn't known, in which case the query can be issued against all fields simultaneously. IA preference for results in a certain language can be defined using [scoring profiles](index-add-scoring-profiles.md). In the example below, matches found in the description in English will be scored higher relative to matches in other languages:
115133

116134
```JSON
117135
"scoringProfiles": [

0 commit comments

Comments
 (0)