OpenSearch/x-pack/plugin/sql/qa
Nik Everett fc5fde7950
Add "did you mean" to ObjectParser (#50938) (#50985)
Check it out:
```
$ curl -u elastic:password -HContent-Type:application/json -XPOST localhost:9200/test/_update/foo?pretty -d'{
  "dac": {}
}'

{
  "error" : {
    "root_cause" : [
      {
        "type" : "x_content_parse_exception",
        "reason" : "[2:3] [UpdateRequest] unknown field [dac] did you mean [doc]?"
      }
    ],
    "type" : "x_content_parse_exception",
    "reason" : "[2:3] [UpdateRequest] unknown field [dac] did you mean [doc]?"
  },
  "status" : 400
}
```

The tricky thing about implementing this is that x-content doesn't
depend on Lucene. So this works by creating an extension point for the
error message using SPI. Elasticsearch's server module provides the
"spell checking" implementation.
s
2020-01-14 17:53:41 -05:00
..
multi-node Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00
no-sql SQL: handle SQL not being available in a more graceful way (#43665) 2019-07-10 14:36:24 +03:00
security Make .async-search-* a restricted namespace (#50294) 2020-01-13 12:20:54 +02:00
single-node SQL: Refactor usage of NamedExpression (#49693) 2019-12-07 11:02:14 +02:00
src/main Add "did you mean" to ObjectParser (#50938) (#50985) 2020-01-14 17:53:41 -05:00
build.gradle Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00