Skip to content

Commit

Permalink
documentation: fix vovel sound grammer
Browse files Browse the repository at this point in the history
  • Loading branch information
GokselKUCUKSAHIN committed Jan 16, 2025
1 parent 7996bcd commit 4703fd0
Show file tree
Hide file tree
Showing 13 changed files with 71 additions and 71 deletions.
10 changes: 5 additions & 5 deletions es/base_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,28 +202,28 @@ func (o Object) SourceExcludes(fields ...string) Object {

// Sort creates a new es.sortType object with the specified field.
//
// This function initializes a es.sortType object with a given field name. The
// This function initializes an es.sortType object with a given field name. The
// field is used to specify the sorting criteria in the search query. The
// resulting es.sortType can be further configured with sorting order and mode.
//
// Example usage:
//
// s := es.Sort("age")
// // s now includes a es.sortType with an "age" field that can be further configured.
// // s now includes an es.sortType with an "age" field that can be further configured.
//
// Parameters:
// - field: A string representing the field to sort by.
//
// Returns:
//
// A es.sortType object with the specified field.
// An es.sortType object with the specified field.
func Sort(field string) sortType {
return sortType{
field: Object{},
}
}

// Order sets the "order" parameter in a es.sortType object.
// Order sets the "order" parameter in an es.sortType object.
//
// This method specifies the order in which the results should be sorted.
// It configures the es.sortType object to sort the results in ascending or
Expand All @@ -244,7 +244,7 @@ func (s sortType) Order(order Order.Order) sortType {
return s.putInTheField("order", order)
}

// Mode sets the "mode" parameter in a es.sortType object.
// Mode sets the "mode" parameter in an es.sortType object.
//
// This method specifies the mode used for sorting the results. The mode
// determines how sorting should be handled, such as by specifying different
Expand Down
8 changes: 4 additions & 4 deletions es/bool_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type ShouldType Array

// Bool creates and returns an empty BoolType object.
//
// This function is typically used to initialize a es.BoolType, which can be
// This function is typically used to initialize an es.BoolType, which can be
// populated later with the appropriate boolean query conditions.
//
// Example usage:
Expand All @@ -27,7 +27,7 @@ func Bool() BoolType {
return BoolType{}
}

// MinimumShouldMatch sets the "minimum_should_match" parameter in a es.BoolType query.
// MinimumShouldMatch sets the "minimum_should_match" parameter in an es.BoolType query.
//
// This method allows you to specify the minimum number of "should" clauses
// that must match in a boolean query. The "minimum_should_match" parameter
Expand All @@ -51,7 +51,7 @@ func (b BoolType) MinimumShouldMatch(minimumShouldMatch any) BoolType {
return b
}

// AdjustPureNegative sets the "adjust_pure_negative" parameter in a es.BoolType query.
// AdjustPureNegative sets the "adjust_pure_negative" parameter in an es.BoolType query.
//
// This method allows you to specify whether pure negative queries should be
// adjusted or not. When set to true, the query will be adjusted to include
Expand All @@ -75,7 +75,7 @@ func (b BoolType) AdjustPureNegative(adjustPureNegative bool) BoolType {
return b
}

// Boost sets the "boost" parameter in a es.BoolType query.
// Boost sets the "boost" parameter in an es.BoolType query.
//
// This method allows you to assign a boost value to a boolean query, which
// can be used to increase or decrease the relevance score of the query's
Expand Down
8 changes: 4 additions & 4 deletions es/inner_hits.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func InnerHits() innerHitsType {
// // The inner hits object now includes a "collapse" field configured for the "author" field.
//
// Parameters:
// - fieldCollapse: A es.fieldCollapseType object defining the collapsing behavior based on a specific field.
// - fieldCollapse: An es.fieldCollapseType object defining the collapsing behavior based on a specific field.
//
// Returns:
//
Expand Down Expand Up @@ -433,7 +433,7 @@ func (ih innerHitsType) Version(version bool) innerHitsType {
//
// Returns:
//
// A es.fieldCollapseType object with the "field" set to the specified value, used for collapsing results.
// An es.fieldCollapseType object with the "field" set to the specified value, used for collapsing results.
func FieldCollapse(field string) fieldCollapseType {
return fieldCollapseType{
"field": field,
Expand All @@ -452,7 +452,7 @@ func FieldCollapse(field string) fieldCollapseType {
// // for both "category" and "subcategory".
//
// Parameters:
// - fieldCollapse: A es.fieldCollapseType object representing the collapse configuration to apply.
// - fieldCollapse: An es.fieldCollapseType object representing the collapse configuration to apply.
//
// Returns:
//
Expand Down Expand Up @@ -521,7 +521,7 @@ func (fc fieldCollapseType) MaxConcurrentGroupSearches(maxConcurrentGroupSearche
//
// Returns:
//
// A es.fieldAndFormatType object with the "field" set to the specified value and an optional "format".
// An es.fieldAndFormatType object with the "field" set to the specified value and an optional "format".
func FieldAndFormat(field string) fieldAndFormatType {
return fieldAndFormatType{
"field": field,
Expand Down
6 changes: 3 additions & 3 deletions es/match_all_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ type matchAllType Object

// MatchAll creates a new es.matchAllType object that matches all documents.
//
// This function initializes a es.matchAllType object that is used to construct queries
// This function initializes an es.matchAllType object that is used to construct queries
// that match all documents. This can be useful for scenarios where you want to ensure
// that all documents are included in the results.
//
// Example usage:
//
// ma := es.MatchAll()
// // ma now contains a es.matchAllType object that matches all documents.
// // ma now contains an es.matchAllType object that matches all documents.
//
// Returns:
//
// A es.matchAllType object with a match_all query that matches all documents.
// An es.matchAllType object with a match_all query that matches all documents.
func MatchAll() matchAllType {
return matchAllType{
"match_all": Object{},
Expand Down
6 changes: 3 additions & 3 deletions es/match_none_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ type matchNoneType Object

// MatchNone creates a new es.matchNoneType object with the specified field and query.
//
// This function initializes a es.matchNoneType object for a match_none query, where the key
// This function initializes an es.matchNoneType object for a match_none query, where the key
// represents the field name and query is the value to be matched. This is used to construct
// queries that explicitly match no documents for the specified value in the given field.
//
// Example usage:
//
// mn := es.MatchNone("title", "es-query-builder")
// // mn now contains a es.matchNoneType object that matches no documents for the "title" field with the query "es-query-builder".
// // mn now contains an es.matchNoneType object that matches no documents for the "title" field with the query "es-query-builder".
//
// Parameters:
// - key: A string representing the field name for the match_none query.
// - query: The value to be used in the match_none query. The type is generic.
//
// Returns:
//
// A es.matchNoneType object containing the specified match_none query.
// An es.matchNoneType object containing the specified match_none query.
func MatchNone[T any](key string, query T) matchNoneType {
return matchNoneType{
"match_none": Object{
Expand Down
6 changes: 3 additions & 3 deletions es/match_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ type matchType Object

// Match creates a new es.matchType object with the specified field and query.
//
// This function initializes a es.matchType object for a match query, where the key
// This function initializes an es.matchType object for a match query, where the key
// is the field name and query is the value to search for in that field. This is used
// to construct queries that match the specified value in the given field.
//
// Example usage:
//
// m := es.Match("title", "es-query-builder")
// // m now contains a es.matchType object that matches the query "es-query-builder" in the "title" field.
// // m now contains an es.matchType object that matches the query "es-query-builder" in the "title" field.
//
// Parameters:
// - key: A string representing the field name for the match query.
// - query: The value to be matched in the specified field. The type is generic.
//
// Returns:
//
// A es.matchType object containing the specified match query.
// An es.matchType object containing the specified match query.
func Match[T any](key string, query T) matchType {
return matchType{
"match": Object{
Expand Down
4 changes: 2 additions & 2 deletions es/nested_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ type nestedType Object
// Example usage:
//
// nestedQuery := es.Nested("comments", es.Bool().Filter(...).MustNot(...))
// // nestedQuery now contains a es.nestedType object with the specified path and query.
// // nestedQuery now contains an es.nestedType object with the specified path and query.
//
// Parameters:
// - path: A string representing the path for the nested query.
// - nestedQuery: The query to be applied within the nested query.
//
// Returns:
//
// A es.nestedType object with the "nested" query and specified path.
// a es.nestedType object with the "nested" query and specified path.
func Nested[T any](path string, nestedQuery T) nestedType {
o := NewQuery(nestedQuery)
o["path"] = path
Expand Down
8 changes: 4 additions & 4 deletions es/query_string.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ type queryStringType Object

// QueryString creates a new es.queryStringType object with the specified query string.
//
// This function initializes a es.queryStringType object with a query string, which
// This function initializes an es.queryStringType object with a query string, which
// is typically used to perform full-text search queries in Elasticsearch. The query string
// can contain multiple terms and operators, allowing for complex search expressions.
//
// Example usage:
//
// q := es.QueryString("Foo AND Bar")
// // q now contains a es.queryStringType object with a query string query.
// // q now contains an es.queryStringType object with a query string query.
//
// Parameters:
// - query: The query string to be used in the search. The type is generic and can be
// any type that represents a query string.
//
// Returns:
//
// A es.queryStringType object containing the specified query string.
// An es.queryStringType object containing the specified query string.
func QueryString[T any](query T) queryStringType {
return queryStringType{
"query_string": Object{
Expand All @@ -45,7 +45,7 @@ func QueryString[T any](query T) queryStringType {
// DefaultField("defaultField")
//
// q := es.QueryString("Foo Bar").DefaultField("title")
// // q now contains a es.queryStringType object where the default field for the query is "title".
// // q now contains an es.queryStringType object where the default field for the query is "title".
//
// Parameters:
// - value: A string representing the field name to be used as the default field in the query.
Expand Down
6 changes: 3 additions & 3 deletions es/range.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ type rangeType Object

// Range creates a new es.rangeType object with the specified field.
//
// This function initializes a es.rangeType object for specifying range queries. The key represents
// This function initializes an es.rangeType object for specifying range queries. The key represents
// the field name, and the es.rangeType object is used to define the range conditions for that field.
//
// Example usage:
//
// r := es.Range("age")
// // r now contains a es.rangeType object with the specified field "age" for range queries.
// // r now contains an es.rangeType object with the specified field "age" for range queries.
//
// Parameters:
// - key: A string representing the field name for the range query.
//
// Returns:
//
// A es.rangeType object with the specified field ready for defining range conditions.
// An es.rangeType object with the specified field ready for defining range conditions.
func Range(key string) rangeType {
return rangeType{
"range": Object{
Expand Down
8 changes: 4 additions & 4 deletions es/regexp_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ type regexpType Object

// Regexp creates a new es.regexpType object with the specified key-value pair.
//
// This function initializes a es.regexpType object with a single regexp query, where the
// This function initializes an es.regexpType object with a single regexp query, where the
// key is the field name and the value is the regexp to search for. This is typically
// used to construct a regexp query in search queries.
//
// Example usage:
//
// t := es.Regexp("endpoint", "/books/.*")
// // t now contains a es.regexpType object with a regexp query for the "endpoint" field.
// // t now contains an es.regexpType object with a regexp query for the "endpoint" field.
//
// Parameters:
// - key: A string representing the field name for the regexp query.
// - value: The value to be searched for in the specified field. The type is regexp.
//
// Returns:
//
// A es.regexpType object containing the specified regexp query.
// An es.regexpType object containing the specified regexp query.
func Regexp(key string, value string) regexpType {
return regexpType{
"regexp": Object{
Expand Down Expand Up @@ -95,7 +95,7 @@ func (r regexpType) Rewrite(rewrite string) regexpType {
return r.putInTheField("rewrite", rewrite)
}

// Boost sets the "boost" parameter in a es.regexpType query.
// Boost sets the "boost" parameter in an es.regexpType query.
//
// This method allows you to specify a boost factor for the regular expression query,
// which influences the relevance score of matching documents. A higher boost value
Expand Down
8 changes: 4 additions & 4 deletions es/simple_query_string.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ type simpleQueryStringType Object

// SimpleQueryString creates a new es.simpleQueryStringType object with the specified query string.
//
// This function initializes a es.simpleQueryStringType object with a simple query string, which
// This function initializes an es.simpleQueryStringType object with a simple query string, which
// is typically used to perform simple text search queries in Elasticsearch. The query string
// can contain multiple terms and operators, allowing for basic search expressions.
//
// Example usage:
//
// q := es.SimpleQueryString("Foo + Bar")
// // q now contains a es.simpleQueryStringType object with a simple query string query.
// // q now contains an es.simpleQueryStringType object with a simple query string query.
//
// Parameters:
// - query: The query string to be used in the search. The type is generic and can be
// any type that represents a query string.
//
// Returns:
//
// A es.simpleQueryStringType object containing the specified query string.
// An es.simpleQueryStringType object containing the specified query string.
func SimpleQueryString[T any](query T) simpleQueryStringType {
return simpleQueryStringType{
"simple_query_string": Object{
Expand Down Expand Up @@ -287,7 +287,7 @@ func (q simpleQueryStringType) QuoteFieldSuffix(value string) simpleQueryStringT
return q.putInTheField("quote_field_suffix", value)
}

// Boost sets the "boost" parameter in a es.simpleQueryStringType query.
// Boost sets the "boost" parameter in an es.simpleQueryStringType query.
//
// This method allows you to specify a boost factor for the simple query string query,
// which influences the relevance score of matching documents. A higher boost value
Expand Down
Loading

0 comments on commit 4703fd0

Please sign in to comment.