explainPredicate
Geneate an explanation if a specific result passes the predicate's criteria This will delegate to more specific functions based on the predicate's key
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
predicate Required | Record<stringIMatchOptions> | ||
result Required | GenericResult | ||
requestOptions Required | IRequestOptions |
Available requestOptions
Property | Type | Notes |
---|
Returns
Property | Type | Notes |
---|---|---|
boolean |
Did the predicate match the query? |
|
IPredicate |
Copy of the Predicate |
|
IMatchReason[] |
Array of reasons why the predicate matched the query |
|
Optional | Record<stringany> |
Additional information about the predicate which can be useful when preparing a UI to display the explanation |
Function defined in common/src/search/_internal/explainPredicate.ts:23