summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/blevesearch/bleve/search/query/query.go
diff options
context:
space:
mode:
authorMura Li <typeless@users.noreply.github.com>2019-11-27 17:23:33 +0800
committerLauris BH <lauris@nix.lv>2019-11-27 11:23:33 +0200
commit9591185c8f45fefb39e84aa465a943b24ad60a26 (patch)
treec46c697093c98eb5404aa7e2519fbe4ba1a2ad47 /vendor/github.com/blevesearch/bleve/search/query/query.go
parentb50dee5a61b3959bb3606973d359741f0ca9af9a (diff)
downloadgitea-9591185c8f45fefb39e84aa465a943b24ad60a26.tar.gz
gitea-9591185c8f45fefb39e84aa465a943b24ad60a26.zip
Upgrade blevesearch to v0.8.1 (#9177)
For #1441 https://github.com/blevesearch/bleve/commit/a91b427b59b893f112021841ba7370d285f8426f
Diffstat (limited to 'vendor/github.com/blevesearch/bleve/search/query/query.go')
-rw-r--r--vendor/github.com/blevesearch/bleve/search/query/query.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/vendor/github.com/blevesearch/bleve/search/query/query.go b/vendor/github.com/blevesearch/bleve/search/query/query.go
index c7c1eefb80..18aca228d4 100644
--- a/vendor/github.com/blevesearch/bleve/search/query/query.go
+++ b/vendor/github.com/blevesearch/bleve/search/query/query.go
@@ -273,6 +273,15 @@ func ParseQuery(input []byte) (Query, error) {
}
return &rv, nil
}
+ _, hasPoints := tmp["polygon_points"]
+ if hasPoints {
+ var rv GeoBoundingPolygonQuery
+ err := json.Unmarshal(input, &rv)
+ if err != nil {
+ return nil, err
+ }
+ return &rv, nil
+ }
return nil, fmt.Errorf("unknown query type")
}