chanced / picker Goto Github PK
View Code? Open in Web Editor NEWUtilities that pair with the official Go Elasticsearch package
License: Apache License 2.0
Utilities that pair with the official Go Elasticsearch package
License: Apache License 2.0
Error messages should be exactly what Elastic would return. That way when an error response is parsed from Elastic, errors.Is
can function as expected regardless of whether the error originated from picker or elasticsearch.
In an effort to move things along, I used interface{}
for dynamic fields on the internal types used for (un)marshaling.
type completionField struct {
Analyzer string `json:"analyzer,omitempty"`
SearchAnalyzer string `json:"search_analyzer,omitempty"`
SearchQuoteAnalyzer string `json:"search_quote_analyzer,omitempty"`
PreserveSeperators interface{} `json:"preserve_separators,omitempty"`
PreservePositionIncrements interface{} `json:"preserve_position_increments,omitempty"`
MaxInputLength interface{} `json:"max_input_length,omitempty"`
Type FieldType `json:"type"`
}
These need to be migrated to either primitive pointer types or dynamic types:
type completionField struct {
Analyzer string `json:"analyzer,omitempty"`
SearchAnalyzer string `json:"search_analyzer,omitempty"`
SearchQuoteAnalyzer string `json:"search_quote_analyzer,omitempty"`
PreserveSeperators *dynamic.Bool `json:"preserve_separators,omitempty"`
PreservePositionIncrements *bool `json:"preserve_position_increments,omitempty"`
MaxInputLength *int `json:"max_input_length,omitempty"`
Type FieldType `json:"type"`
}
I'm just not sure which. Things I need to think through:
Float64Ptr
and CoerceInt64Ptr
to the types in the dynamic package. Should I be concerned about the usability of this for the dynamic package? It wont be a pointer to the actual value.Doing so should improve performance of enc/dec.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.