Skip to main content
Version: 11.13.0

Did You Mean

The Did You Mean feature facilitates the use of the didYouMean property for a result to propose some correction for it to easily apply to the query.

API Reference​

Inputs​

PropertyTypeDescription
resultResultThe query result

Properties​

PropertyTypeDescription
spellingCorrectionModeSpellingCorrectionModeThe correction mode (see SpellingCorrectionMode type in @sinequa/atomic for details)
correctionstringThe suggested correction
originalstringThe original text from the query to be corrected

Methods​

MethodDescription
selectCorrected()Changes the query with the correction
selectOriginal()Forces the original text to be used by the search

Usage​

sample.component.ts
import { DidYouMeanComponent } from "@angular/atomic-angular";

@Component({
selector: "sample-component",
template: `
@if (result()) {
<app-did-you-mean [result]="result()" />
}
`,
})
export class SampleComponent {
result = signal<Result | undefined>(undefined);
}