Search issueshttps://community.opengroup.org/osdu/platform/system/search-service/-/issues2024-01-15T11:56:08Zhttps://community.opengroup.org/osdu/platform/system/search-service/-/issues/135ADR Provide suggestions for auto-complete of input2024-01-15T11:56:08ZMark ChanceADR Provide suggestions for auto-complete of input# ADR: Autocomplete
<a name="TOC"></a>
[[_TOC_]]
# Status
- [x] Proposed
- [x] Trialing
- [ ] Under review
- [ ] Approved
- [ ] Retired
# Background
Shell application developer stakeholders want to provide to their users the functi...# ADR: Autocomplete
<a name="TOC"></a>
[[_TOC_]]
# Status
- [x] Proposed
- [x] 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](https://community.opengroup.org/osdu/platform/system/indexer-service/-/issues/113)
[Back to TOC](#TOC)
## 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](#TOC)
# Tradeoff Analysis
[Back to TOC](#TOC)
# Proposed solution
The search query json will support this syntax:
```json
{
"suggestPhrase": "united"
}
```
Which would return something of the form:
```json
{
"phraseSuggestions": [
"United States",
"United States therm",
"United Kingdom",
"United Kingdom British thermal unit",
"United Kingdom term",
"United Kingdom nautical mile",
]
}
```
[Back to TOC](#TOC)
# 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.
[Back to TOC](#TOC)
#EOF.M23 - Release 0.26Mark ChanceMark Chancehttps://community.opengroup.org/osdu/platform/system/search-service/-/issues/94Search needs to be case-sensitive to be consistent with Schema2022-08-23T15:19:05ZAn NgoSearch needs to be case-sensitive to be consistent with SchemaCurrently, Schema service is case sensitive. Therefore, schema osdu:document:well:1.0.0 and osdu:Document:Well:1.0.0 are different.
Search is case in-sensitive. Therefore, it treats these 2 schema to be the same.
Due to this inconsiste...Currently, Schema service is case sensitive. Therefore, schema osdu:document:well:1.0.0 and osdu:Document:Well:1.0.0 are different.
Search is case in-sensitive. Therefore, it treats these 2 schema to be the same.
Due to this inconsistency, this payload returns the wrong results, for example:
```
{
"kind":"osdu:document:well:1.0.0",
"query": "*"
}
```
Here, it will return results from both osdu:document:well:1.0.0 and osdu:Document:Well:1.0.0.