Interface QueryContext
public interface QueryContext
-
Method Summary
Modifier and TypeMethodDescriptiondefault GatewayContext
default Stream<ItemResult>
matchItemName
(String name) Intended for use by ItemSearchDelegate implementations to match item names.
-
Method Details
-
getRequestContext
RequestContext getRequestContext() -
getGatewayContext
-
matches
- Returns:
- relative match strength score (higher is better) or empty if not a match
-
matchItemName
Intended for use by ItemSearchDelegate implementations to match item names. Example:public Stream<ItemResult> search(QueryContext context) { return getItemNames(context).stream().flatMap(context::matchItemName); }
- Parameters:
name
- the name of the item to match- Returns:
- a stream of zero or one ItemResult
-