ADR Provide suggestions for auto-complete of input
ADR: Autocomplete
- ADR: Autocomplete
- Status
- Background
- Context & Scope
- Tradeoff Analysis
- Proposed solution
- Change Management
- Decision
- Consequences
Status
-
Proposed -
Trialing -
Under review -
Approved -
Retired
Background
Shell application developer stakeholders want to provide to their users the functionality to provide auto-complete suggestions based on partial input.
Context & Scope
Based on words occurring in OSDU platform records, a comparison is made to all text tokens occurring in all fields of a record. For this case we propose using bagOfWords described in indexer ADR
Requirements
The partial input is passed to the search service and a list of suggestions is returned. To be useful, the response time must be under 2 seconds. Back to TOC
Tradeoff Analysis
Proposed solution
The search query json will support this syntax:
{
"suggestPhrase": "united"
}
Which would return something of the form:
{
"phraseSuggestions": [
"United States",
"United States therm",
"United Kingdom",
"United Kingdom British thermal unit",
"United Kingdom term",
"United Kingdom nautical mile",
]
}
Change Management
- Operators may need to execute reindex with force_clean=true action on indices to enable this feature.
Decision
Consequences
- The search code changes will not impact any existing queries or functionality since this is a new field.
#EOF.
Edited by Mark Chance