Skip to content

Commit

Permalink
fix wildcard for filters
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris committed Nov 15, 2024
1 parent 51f12e9 commit bd7818b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ func (rt *Router) ApiHandler(w http.ResponseWriter, r *http.Request) {
for _, f := range request.Search.Filters {

if f.Operation == "is" {
filters += `{ "wildcard": {"` + f.Field + `": {"value": "` + f.Value + `" } } },`
filters += `{ "wildcard": {"` + f.Field + `.keyword": {"value": "` + f.Value + `" } } },`
} else if f.Operation == "exists" {
filters += `{ "exists": {"field":"` + f.Field + `" } },`
} else if f.Operation == "is_not" {
Expand Down Expand Up @@ -747,7 +747,7 @@ func (rt *Router) ApiHandler(w http.ResponseWriter, r *http.Request) {
for _, f := range request.Search.Filters {

if f.Operation == "is" {
filters += `{ "wildcard": {"` + f.Field + `": {"value": "` + f.Value + `" } } },`
filters += `{ "wildcard": {"` + f.Field + `.keyword": {"value": "` + f.Value + `" } } },`
} else if f.Operation == "exists" {
filters += `{ "exists": {"field":"` + f.Field + `" } },`
} else if f.Operation == "is_not" {
Expand Down
2 changes: 1 addition & 1 deletion modules/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

package version

var Version = "extractor/v0.2.14"
var Version = "extractor/v0.2.15"

0 comments on commit bd7818b

Please sign in to comment.