Skip to content

Commit e81090d

Browse files
authored
Merge pull request #173976 from HeidiSteen/heidist-work
spell check corrections (basic +, no sign up, no fee)
2 parents 1a896fb + d843e50 commit e81090d

File tree

2 files changed

+33
-18
lines changed

2 files changed

+33
-18
lines changed

articles/search/semantic-search-overview.md

Lines changed: 5 additions & 5 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: 09/09/2021
11+
ms.date: 10/01/2021
1212
ms.custom: references_regions
1313
---
1414
# Semantic search in Azure Cognitive Search
@@ -84,14 +84,14 @@ Semantic search is available through [sign-up registration](https://aka.ms/Seman
8484

8585
| Feature | Tier | Region | Sign up | Pricing |
8686
|---------|------|--------|---------------------|-------------------|
87-
| Semantic search (captions, highlights, answers) | Standard tier (S1, S2, S3) | North Central US, West US, West US 2, East US 2, North Europe, West Europe | Required | [Cognitive Search pricing page](https://azure.microsoft.com/pricing/details/search/) |
88-
| Spell check | Any | North Central US, West US, West US 2, East US 2, North Europe, West Europe | Required | None (free) |
87+
| Semantic search (rank, captions, highlights, answers) | Standard tier (S1, S2, S3) | North Central US, West US, West US 2, East US 2, North Europe, West Europe | Required | [Cognitive Search pricing page](https://azure.microsoft.com/pricing/details/search/) |
88+
| Spell check | Basic and above | All | None | None (free) |
8989

90-
You can use spell check without semantic search, free of charge. Charges for semantic search are levied when query requests include `queryType=semantic` and the search string is not empty (for example, `search=pet friendly hotels in new york`. Empty search (queries where `search=*`) are not charged, even if queryType is set to `semantic`.
90+
Charges for semantic search are levied when query requests include "queryType=semantic" and the search string is not empty (for example, "search=pet friendly hotels in new york". If your search string is empty ("search=*"), you won't be charged, even if the queryType is set to "semantic".
9191

9292
## Disable semantic search
9393

94-
Only a search service that has the feature enabled can incur charges. However, if you want full protection against accidental usage, set the [disabled option](/rest/api/searchmanagement/2021-04-01-preview/services/create-or-update#searchsemanticsearch).
94+
For full protection against accidental usage and charges, you can [disable semantic search](/rest/api/searchmanagement/2021-04-01-preview/services/create-or-update#searchsemanticsearch) using the Create or Update Service API on your search service. After the feature is disabled, any requests that include the semantic query type will be rejected.
9595

9696
* Management REST API version 2021-04-01-Preview provides this option
9797

articles/search/speller-how-to-add.md

Lines changed: 28 additions & 13 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: 05/27/2021
11+
ms.date: 09/29/2021
1212
ms.custom: references_regions
1313
---
1414
# Add spell check to queries in Cognitive Search
@@ -18,19 +18,27 @@ ms.custom: references_regions
1818
1919
You can improve recall by spell-correcting individual search query terms before they reach the search engine. The **speller** parameter is supported for all query types: [simple](query-simple-syntax.md), [full](query-lucene-syntax.md), and the new [semantic](semantic-how-to-query-request.md) option currently in public preview.
2020

21+
Speller was released in tandem with the [semantic search preview](semantic-search-overview.md) and shares the queryLanguage parameter, but is otherwise an independent feature with it's own prerequisites. There is no sign-up or additional charges for using this feature.
22+
2123
## Prerequisites
2224

23-
Speller was released in tandem with the [semantic search preview](semantic-search-overview.md). As such, [sign up](https://aka.ms/SemanticSearchPreviewSignup) is required but there is no charge for using it, and no tier restrictions. Speller is available in the [same regions](semantic-search-overview.md#availability-and-pricing) as semantic search.
25+
To use spell check, you will need the following:
2426

25-
Once sign up is processed, you will need the following:
27+
+ A search service at Basic tier or above, in any region.
2628

27-
+ An existing search index, with content in a [supported language](#supported-languages). Currently, spell correction does not work with [synonyms](search-synonyms.md). Avoid using it on indexes that specify a synonym map in any field definition.
29+
+ An existing search index with content in a [supported language](#supported-languages).
2830

29-
+ A search client for sending queries
31+
+ [A query request](/rest/api/searchservice/preview-api/search-documents) that has "speller=lexicon", and "queryLanguage" set to a [supported language](#supported-languages). Spell check works on strings passed in the "search" parameter. It's not supported for filters.
3032

31-
The search client must support preview REST APIs on the query request. You can use [Postman](search-get-started-rest.md), [Visual Studio Code](search-get-started-vs-code.md), or code that you've modified to make REST calls to the preview APIs.
33+
Use a search client that supports preview APIs on the query request. For REST, you can use [Postman](search-get-started-rest.md), [Visual Studio Code](search-get-started-vs-code.md), or code that you've modified to make REST calls to the preview APIs. You can also use beta releases of the Azure SDKs.
3234

33-
+ [A query request](/rest/api/searchservice/preview-api/search-documents) that invokes spell correction must have "api-version=2020-06-30-Preview", "speller=lexicon", and "queryLanguage" set to a [supported language](#supported-languages).
35+
| Client library | Versions |
36+
|----------|----------|
37+
| REST API | [2021-04-30-Preview](/rest/api/searchservice/index-preview) or 2020-06-30-Preview |
38+
| Azure SDK for .NET | [version 11.3.0-beta.2](https://www.nuget.org/packages/Azure.Search.Documents/11.3.0-beta.2) |
39+
| Azure SDK for Java | [version 11.4.0-beta.2](https://search.maven.org/artifact/com.azure/azure-search-documents/11.4.0-beta.2/jar) |
40+
| Azure SDK for JavaScript | [version 11.2.0-beta.2](https://www.npmjs.com/package/@azure/search-documents/v/11.2.0-beta.2) |
41+
| Azure SDK for Python | [version 11.2.0b3](https://pypi.org/project/azure-search-documents/11.2.0b3/) |
3442

3543
## Spell correction with simple search
3644

@@ -50,7 +58,7 @@ POST https://[service name].search.windows.net/indexes/hotels-sample-index/docs/
5058

5159
## Spell correction with full Lucene
5260

53-
Spelling correction occurs on individual query terms that undergo analysis, which is why you can use the speller parameter with some Lucene queries, but not others.
61+
Spelling correction occurs on individual query terms that undergo text analysis, which is why you can use the speller parameter with some Lucene queries, but not others.
5462

5563
+ Incompatible query forms that bypass text analysis include: wildcard, regex, fuzzy
5664
+ Compatible query forms include: fielded search, proximity, term boosting
@@ -88,26 +96,33 @@ POST https://[service name].search.windows.net/indexes/hotels-sample-index/docs/
8896

8997
## Supported languages
9098

91-
For spell check valid values for queryLanguage can be found in the following table. This list is a subset of the [supported languages (REST API reference)](/rest/api/searchservice/preview-api/search-documents#queryLanguage). If you are using semantic captions and answers without spell check, you can choose from the larger list of languages and variants.
99+
Valid values for queryLanguage can be found in the following table, copied from the list of [supported languages (REST API reference)](/rest/api/searchservice/preview-api/search-documents#queryLanguage).
92100

93101
| Language | queryLanguage |
94102
|----------|---------------|
95103
| English [EN] | EN, EN-US (default) |
96104
| Spanish [ES] | ES, ES-ES (default)|
97105
| French [FR] | FR, FR-FR (default) |
98106
| German [DE] | DE, DE-DE (default) |
107+
| Dutch [NL] | NL, NL-BE, NL-NL (default) |
108+
109+
### queryLanguage considerations
110+
111+
As noted elsewhere, a query request can only have one queryLanguage parameter, but that parameter is shared by multiple features, each of which supports a different cohort of languages. If you are just using spell check, the list of supported languages in the above table is the complete list.
112+
113+
### Language analyzer considerations
99114

100-
## Language considerations
115+
Indexes that contain non-English content often use [language analyzers](index-add-language-analyzers.md) on non-English fields to apply the linguistic rules of the native language.
101116

102-
The queryLanguage parameter required for speller must be consistent with any [language analyzers](index-add-language-analyzers.md) assigned to field definitions in the index. For example, if a field's content was indexed using the "fr.microsoft" language analyzer, then queries, spell check, semantic captions, and semantic answers should all use a French language library of some form.
117+
If you are now adding spell check to content that also undergoes language analysis, you will achieve better results if you use the same language at every step of indexing and query processing. For example, if a field's content was indexed using the "fr.microsoft" language analyzer, then queries, spell check, semantic captions, and semantic answers should all use a French lexicon or language library of some form.
103118

104119
To recap how language libraries are used in Cognitive Search:
105120

106-
+ Language analyzers can be invoked during indexing and query execution, and can be either full Lucene (for example, "de.lucene") or Microsoft ("de.microsoft).
121+
+ Language analyzers can be invoked during indexing and query execution, and are either Apache Lucene (for example, "de.lucene") or Microsoft ("de.microsoft).
107122

108123
+ Language lexicons invoked during spell check are specified using one of the language codes in the table above.
109124

110-
In a query request, the queryLanguage applies equally to speller, [answers](semantic-answers.md), and captions. There is no override for individual parts of a semantic response.
125+
In a query request, the value assigned to queryLanguage applies equally to speller, [answers](semantic-answers.md), and captions.
111126

112127
> [!NOTE]
113128
> Language consistency across various property values is only a concern if you are using language analyzers. If you are using language-agnostic analyzers (such as keyword, simple, standard, stop, whitespace, or `standardasciifolding.lucene`), then the queryLanguage value can be whatever you want.

0 commit comments

Comments
 (0)