diff --git a/search/opensearch_types.go b/search/opensearch_types.go index d2ae209e460a78428a27aad81dfb2ba836b35753..6ddbfac65f5a36339ed1b79fd9cf8f224db9ed18 100644 --- a/search/opensearch_types.go +++ b/search/opensearch_types.go @@ -43,7 +43,7 @@ type SearchRequestBody struct { type Query struct { //one of: Match *QueryNameValue `json:"match,omitempty" doc:"<field>:<value>"` - Term *QueryNameValue `json:"term,omitempty"` + Term *QueryTerm `json:"term,omitempty"` Range *QueryRange `json:"range,omitempty"` MultiMatch *QueryMultiMatch `json:"multi_match,omitempty"` Bool *QueryBool `json:"bool,omitempty"` @@ -51,6 +51,8 @@ type Query struct { Wildcard *QueryNameValue `json:"wildcard,omitempty"` //https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-wildcard-query.html } +type QueryTerm map[string]string //<oper>:<value> + type QueryMultiMatch struct { Query string `json:"query" doc:"Full value match search in selected fields"` Fields []string `json:"fields,omitempty" doc:"List of fields"`