-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Add script_score to query DSL #253
Comments
Related, we've been working on https://github.com/opensearch-project/opensearch-api-specification. For this client we need help for someone to pickup #233 and other generator-related work. @quangcap Now that you're very familiar with this API, would you be able to contribute it to the spec as well? https://github.com/opensearch-project/opensearch-api-specification |
Closed via #254. |
@dblock Sorry for the late reply! About #233: I tried out the ApiGenerator, and it throws a lot of errors, probably because the current parser doesn’t support OAS 3.1 yet. I’ve seen some work being done on the parser (kevindew/openapi3_parser#22), but I don’t think it’ll be ready anytime soon. As for adding |
FWIW, I've been able to load the spec with the current openapi3_parser: require 'open-uri'
require 'openapi3_parser'
openapi_url = "https://github.com/opensearch-project/opensearch-api-specification/releases/download/main-latest/opensearch-openapi.yaml"
openapi_path = "opensearch-openapi.yaml"
File.write(openapi_path, URI.open(openapi_url).read) unless File.exists?(openapi_path)
puts "Loading #{openapi_path} (#{File.size(openapi_path)} byte(s)) ..."
doc = Openapi3Parser.load_file(openapi_path)
puts "Loaded #{openapi_url} with #{doc.paths.size} path(s)."
doc.paths.keys.each do |key|
puts key
end |
I've been able to load it with the current openapi3_parser. However, running ...
doc = Openapi3Parser.load_file(openapi_path)
puts "Loaded #{openapi_url} with #{doc.paths.size} path(s)."
puts "Spec is valid: " + doc.valid?.to_s
puts "Errors:"
doc.errors.each do |err|
puts err
end which prints:
|
@quangcap Do you know whether those are legit errors? If they are, please do open an issue in https://github.com/opensearch-project/opensearch-api-specification. |
Is your feature request related to a problem?
Script Score query was added to OpenSearch 2.9 and current query DSL does not support it.
I use script score a lot in my case, so I would want to add it in current query DSL.
What solution would you like?
Add script_score to query DSL
Do you have any additional context?
OpenSearch document on script_score: https://opensearch.org/docs/latest/query-dsl/specialized/script-score/
The text was updated successfully, but these errors were encountered: