-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add matchedSubstrings to spellCheck interface (#192)
Raiden needs access](https://yext.slack.com/archives/C03NQ9X8ACB/p1658505872261039) to `matchedSubstrings` from the spellCheck part of the Search API response. Since changing `correctedQuery` from a string to an object would be a breaking change, we added a new property to the spellCheck interface that holds the `matchedSubstrings`. `matchedSubstrings` was also added to the Core response when the spellCheck object is created in `createSpellCheck`. J=SLAP-2274 TEST=manual It was verified that when spellCheck was provided in the Core response, that `matchedSubstrings` was also provided as its own property.
- Loading branch information
Showing
5 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-core](./search-core.md) > [SpellCheck](./search-core.spellcheck.md) > [matchedSubstrings](./search-core.spellcheck.matchedsubstrings.md) | ||
|
||
## SpellCheck.matchedSubstrings property | ||
|
||
An array of substring matches which correspond to the highlighting. Offset indicates the index of the match, and the length indicates the number of characters of the match. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
matchedSubstrings: { | ||
length: number; | ||
offset: number; | ||
}[]; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters