OpenSearch/libs
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
..
cli Refactor environment variable processing for Docker (#50221) 2019-12-16 15:39:28 +00:00
core correct licensing and incorporation of FastMath (#49122) (#49441) 2019-11-21 09:02:30 -08:00
dissect Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00
geo Clean up wire test case a bit (#50627) (#50632) 2020-01-05 16:20:38 -05:00
grok Sync grok patterns with logstash patterns (#50381) 2020-01-08 14:59:34 +01:00
nio Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00
plugin-classloader [Backport] Replace usages RandomizedTestingTask with built-in Gradle Test (#40978) (#40993) 2019-04-09 11:52:50 -07:00
secure-sm Add SecureSM support for newer IDEA versions (#49747) 2019-12-04 13:50:06 +01:00
ssl-config Improved diagnostics for TLS trust failures (#49669) 2019-11-29 15:01:20 +11:00
x-content 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