Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bobgroup-go-utils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bob Public Utils
bobgroup-go-utils
Commits
7342f205
Commit
7342f205
authored
3 years ago
by
Francé Wilke
Browse files
Options
Downloads
Patches
Plain Diff
Api logs wildcard search
parent
c52ea579
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
search/opensearch_types.go
+9
-2
9 additions, 2 deletions
search/opensearch_types.go
with
9 additions
and
2 deletions
search/opensearch_types.go
+
9
−
2
View file @
7342f205
...
...
@@ -48,6 +48,7 @@ type Query struct {
MultiMatch
*
QueryMultiMatch
`json:"multi_match,omitempty"`
Bool
*
QueryBool
`json:"bool,omitempty"`
QueryString
*
QueryString
`json:"query_string,omitempty"`
Wildcard
*
QueryNameValue
`json:"wildcard,omitempty"`
//https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-wildcard-query.html
}
type
QueryMultiMatch
struct
{
...
...
@@ -57,6 +58,7 @@ type QueryMultiMatch struct {
type
QueryString
struct
{
Query
string
`json:"query" doc:"Text search with partial matches, using asterisk for optional or question mark for required wildcards before and/or after text"`
Fields
[]
string
`json:"fields,omitempty" doc:"List of fields"`
}
// https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html
...
...
@@ -72,10 +74,15 @@ type QueryBool struct {
type
QueryNameValue
map
[
string
]
QueryValue
type
QueryValue
struct
{
Query
string
`json:"query"`
Query
string
`json:"query
,omitempty
"`
Operator
string
`json:"operator,omitempty"`
//defaults to "or", accepted values: or|and
Fuzziness
string
`json:"fuzziness,omitempty"`
//https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#fuzziness
ZeroTermsQuery
string
`json:"zero_terms_query,omitempty"`
Value
string
`json:"value,omitempty"`
//https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-wildcard-query.html
}
func
QueryValueTextValue
(
text
string
)
QueryValue
{
return
QueryValue
{
Value
:
text
}
}
func
QueryValueText
(
text
string
)
QueryValue
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment