SpellCorrectionSpec
Stay organized with collections
Save and categorize content based on your preferences.
The specification for query spell correction.
JSON representation |
{
"mode": enum (Mode )
} |
Fields |
mode |
enum (Mode )
The mode under which spell correction replaces the original search query. Defaults to Mode.AUTO .
|
Mode
Enum describing under which mode spell correction should occur.
Enums |
MODE_UNSPECIFIED |
Unspecified spell correction mode. In this case, server behavior defaults to Mode.AUTO . |
SUGGESTION_ONLY |
Search API tries to find a spelling suggestion. If a suggestion is found, it is put in the SearchResponse.corrected_query . The spelling suggestion won't be used as the search query. |
AUTO |
Automatic spell correction built by the Search API. Search will be based on the corrected query if found. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-13 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-13 UTC."],[[["The `mode` field in the JSON representation defines how spell correction is applied to the search query."],["The default spell correction `mode` is set to `AUTO`, enabling automatic correction by the Search API."],["`SUGGESTION_ONLY` mode provides a spelling suggestion in the `SearchResponse.corrected_query` without automatically using it for the search."],["`MODE_UNSPECIFIED` indicates an undefined correction mode which will then default to `AUTO` correction."]]],[]]