From e7fc80d5559ad9128e76da9ee386476c9dcfd1d1 Mon Sep 17 00:00:00 2001 From: Nic Pottier Date: Thu, 7 Feb 2019 11:14:56 -0800 Subject: [PATCH] move to go module, dont ignore any keywords --- .travis.yml | 6 ++- Gopkg.lock | 129 ---------------------------------------------------- Gopkg.toml | 50 -------------------- go.mod | 24 ++++++++++ go.sum | 40 ++++++++++++++++ indexer.go | 14 ++---- 6 files changed, 73 insertions(+), 190 deletions(-) delete mode 100644 Gopkg.lock delete mode 100644 Gopkg.toml create mode 100644 go.mod create mode 100644 go.sum diff --git a/.travis.yml b/.travis.yml index 32f8e88..a7c3588 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,11 @@ addons: - postgresql-client-10 go: -- "1.10" +- "1.11" + +env: + global: + - GO111MODULE=on before_install: - wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.2.3.deb && sudo dpkg -i --force-confnew elasticsearch-6.2.3.deb diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index 39cde3f..0000000 --- a/Gopkg.lock +++ /dev/null @@ -1,129 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - name = "github.com/certifi/gocertifi" - packages = ["."] - revision = "deb3ae2ef2610fde3330947281941c562861188b" - version = "2018.01.18" - -[[projects]] - name = "github.com/davecgh/go-spew" - packages = ["spew"] - revision = "346938d642f2ec3594ed81d874461961cd0faa76" - version = "v1.1.0" - -[[projects]] - name = "github.com/evalphobia/logrus_sentry" - packages = ["."] - revision = "57846a82817615f185b10cc40de8dc60c1ca5ae1" - version = "v0.4.5" - -[[projects]] - name = "github.com/fatih/structs" - packages = ["."] - revision = "a720dfa8df582c51dee1b36feabb906bde1588bd" - version = "v1.0" - -[[projects]] - branch = "master" - name = "github.com/getsentry/raven-go" - packages = ["."] - revision = "d1470f50d3a3a38533355a9fab7393e25a3b4226" - -[[projects]] - branch = "master" - name = "github.com/lib/pq" - packages = [ - ".", - "oid" - ] - revision = "d34b9ff171c21ad295489235aec8b6626023cd04" - -[[projects]] - branch = "master" - name = "github.com/mailru/easyjson" - packages = [ - ".", - "buffer", - "jlexer", - "jwriter" - ] - revision = "8b799c424f57fa123fc63a99d6383bc6e4c02578" - -[[projects]] - name = "github.com/naoina/go-stringutil" - packages = ["."] - revision = "6b638e95a32d0c1131db0e7fe83775cbea4a0d0b" - version = "v0.1.0" - -[[projects]] - name = "github.com/naoina/toml" - packages = [ - ".", - "ast" - ] - revision = "e6f5723bf2a66af014955e0888881314cf294129" - version = "v0.1.1" - -[[projects]] - name = "github.com/nyaruka/ezconf" - packages = ["."] - revision = "4189460bbdbcd38bb447e77ab6421747ce65b1b4" - version = "v0.2.1" - -[[projects]] - name = "github.com/olivere/elastic" - packages = [ - ".", - "config", - "uritemplates" - ] - revision = "d6362604399c7af560b54f048b4fcfbdd6eff293" - version = "v6.1.14" - -[[projects]] - name = "github.com/pkg/errors" - packages = ["."] - revision = "645ef00459ed84a119197bfb8d8205042c6df63d" - version = "v0.8.0" - -[[projects]] - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" - -[[projects]] - name = "github.com/sirupsen/logrus" - packages = ["."] - revision = "c155da19408a8799da419ed3eeb0cb5db0ad5dbc" - version = "v1.0.5" - -[[projects]] - name = "github.com/stretchr/testify" - packages = ["assert"] - revision = "12b6f73e6084dad08a7c6e575284b177ecafbc71" - version = "v1.2.1" - -[[projects]] - branch = "master" - name = "golang.org/x/crypto" - packages = ["ssh/terminal"] - revision = "88942b9c40a4c9d203b82b3731787b672d6e809b" - -[[projects]] - branch = "master" - name = "golang.org/x/sys" - packages = [ - "unix", - "windows" - ] - revision = "13d03a9a82fba647c21a0ef8fba44a795d0f0835" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "6f385dbd2b09601ea268378bfb9d683a46e71c875d1dbdff49017b511923e4f6" - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index f277bb8..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,50 +0,0 @@ -# Gopkg.toml example -# -# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" -# -# [prune] -# non-go = false -# go-tests = true -# unused-packages = true - - -[[constraint]] - branch = "master" - name = "github.com/lib/pq" - -[[constraint]] - name = "github.com/nyaruka/ezconf" - version = "0.2.1" - -[[constraint]] - name = "github.com/sirupsen/logrus" - version = "1.0.5" - -[prune] - go-tests = true - unused-packages = true - -[[constraint]] - name = "github.com/stretchr/testify" - version = "1.2.1" - -[[constraint]] - name = "github.com/olivere/elastic" - version = "6.1.14" diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..724f3f5 --- /dev/null +++ b/go.mod @@ -0,0 +1,24 @@ +module github.com/nyaruka/rp-indexer + +require ( + github.com/certifi/gocertifi v0.0.0-20180118203423-deb3ae2ef261 + github.com/davecgh/go-spew v1.1.0 + github.com/evalphobia/logrus_sentry v0.4.5 + github.com/fatih/structs v1.0.0 + github.com/fortytw2/leaktest v1.3.0 // indirect + github.com/getsentry/raven-go v0.0.0-20180405121644-d1470f50d3a3 + github.com/lib/pq v0.0.0-20180327071824-d34b9ff171c2 + github.com/mailru/easyjson v0.0.0-20180323154445-8b799c424f57 + github.com/naoina/go-stringutil v0.1.0 + github.com/naoina/toml v0.1.1 + github.com/nyaruka/ezconf v0.2.1 + github.com/olivere/elastic v6.1.14+incompatible + github.com/pkg/errors v0.8.0 + github.com/pmezard/go-difflib v1.0.0 + github.com/sirupsen/logrus v1.0.5 + github.com/stretchr/testify v1.2.1 + golang.org/x/crypto v0.0.0-20180322175230-88942b9c40a4 + golang.org/x/sys v0.0.0-20180326154331-13d03a9a82fb + gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect + gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..2cb8612 --- /dev/null +++ b/go.sum @@ -0,0 +1,40 @@ +github.com/certifi/gocertifi v0.0.0-20180118203423-deb3ae2ef261 h1:6/yVvBsKeAw05IUj4AzvrxaCnDjN4nUqKjW9+w5wixg= +github.com/certifi/gocertifi v0.0.0-20180118203423-deb3ae2ef261/go.mod h1:GJKEexRPVJrBSOjoqN5VNOIKJ5Q3RViH6eu3puDRwx4= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/evalphobia/logrus_sentry v0.4.5 h1:weRoBjojMYPp57TLDjPEkP58JVHHSiqNrxG+h3ODdPM= +github.com/evalphobia/logrus_sentry v0.4.5/go.mod h1:pKcp+vriitUqu9KiWj/VRFbRfFNUwz95/UkgG8a6MNc= +github.com/fatih/structs v1.0.0 h1:BrX964Rv5uQ3wwS+KRUAJCBBw5PQmgJfJ6v4yly5QwU= +github.com/fatih/structs v1.0.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/getsentry/raven-go v0.0.0-20180405121644-d1470f50d3a3 h1:md1zEr2oSVWYNfQj+6TL/nmAFf5gY3Tp44lzskzK9QU= +github.com/getsentry/raven-go v0.0.0-20180405121644-d1470f50d3a3/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= +github.com/lib/pq v0.0.0-20180327071824-d34b9ff171c2 h1:hRGSmZu7j271trc9sneMrpOW7GN5ngLm8YUZIPzf394= +github.com/lib/pq v0.0.0-20180327071824-d34b9ff171c2/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/mailru/easyjson v0.0.0-20180323154445-8b799c424f57 h1:qhv1ir3dIyOFmFU+5KqG4dF3zSQTA4nn1DFhu2NQC44= +github.com/mailru/easyjson v0.0.0-20180323154445-8b799c424f57/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/naoina/go-stringutil v0.1.0 h1:rCUeRUHjBjGTSHl0VC00jUPLz8/F9dDzYI70Hzifhks= +github.com/naoina/go-stringutil v0.1.0/go.mod h1:XJ2SJL9jCtBh+P9q5btrd/Ylo8XwT/h1USek5+NqSA0= +github.com/naoina/toml v0.1.1 h1:PT/lllxVVN0gzzSqSlHEmP8MJB4MY2U7STGxiouV4X8= +github.com/naoina/toml v0.1.1/go.mod h1:NBIhNtsFMo3G2szEBne+bO4gS192HuIYRqfvOWb4i1E= +github.com/nyaruka/ezconf v0.2.1 h1:TDXWoqjqYya1uhou1mAJZg7rgFYL98EB0Tb3+BWtUh0= +github.com/nyaruka/ezconf v0.2.1/go.mod h1:ey182kYkw2MIi4XiWe1FR/mzI33WCmTWuceDYYxgnQw= +github.com/olivere/elastic v6.1.14+incompatible h1:X7PDDou5+WuNrh5WgtS5+gKzbUmSNXvF0mQZ++VsZYU= +github.com/olivere/elastic v6.1.14+incompatible/go.mod h1:J+q1zQJTgAz9woqsbVRqGeB5G1iqDKVBWLNSYW8yfJ8= +github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/sirupsen/logrus v1.0.5 h1:8c8b5uO0zS4X6RPl/sd1ENwSkIc0/H2PaHxE3udaE8I= +github.com/sirupsen/logrus v1.0.5/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/stretchr/testify v1.2.1 h1:52QO5WkIUcHGIR7EnGagH88x1bUzqGXTC5/1bDTUQ7U= +github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +golang.org/x/crypto v0.0.0-20180322175230-88942b9c40a4 h1:AJCW0rhPjFKEAoValWpqnRKxX8YV0Xvqfw+dOexCTPc= +golang.org/x/crypto v0.0.0-20180322175230-88942b9c40a4/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/sys v0.0.0-20180326154331-13d03a9a82fb h1:w1eDrzbtlRsu1SyjnZZFUBVuhRN2Rn6DlrHCx9s4ud0= +golang.org/x/sys v0.0.0-20180326154331-13d03a9a82fb/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +gopkg.in/airbrake/gobrake.v2 v2.0.9 h1:7z2uVWwn7oVeeugY1DtlPAy5H+KYgB1KeKTnqjNatLo= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 h1:OAj3g0cR6Dx/R07QgQe8wkA9RNjB2u4i700xBkIT4e0= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= diff --git a/indexer.go b/indexer.go index c0193eb..4cb1cd7 100644 --- a/indexer.go +++ b/indexer.go @@ -474,7 +474,7 @@ const indexSettings = ` "type": "truncate", "length": 8 } - } + } } }, @@ -492,7 +492,6 @@ const indexSettings = ` }, "text": { "type": "keyword", - "ignore_above": 64, "normalizer": "lowercase" }, "number": { @@ -508,8 +507,7 @@ const indexSettings = ` }, "state_keyword": { "type": "keyword", - "normalizer": "lowercase", - "ignore_above": 64 + "normalizer": "lowercase" }, "district": { "type": "text", @@ -517,8 +515,7 @@ const indexSettings = ` }, "district_keyword": { "type": "keyword", - "normalizer": "lowercase", - "ignore_above": 64 + "normalizer": "lowercase" }, "ward": { "type": "text", @@ -526,8 +523,7 @@ const indexSettings = ` }, "ward_keyword": { "type": "keyword", - "normalizer": "lowercase", - "ignore_above": 64 + "normalizer": "lowercase" } } }, @@ -540,7 +536,6 @@ const indexSettings = ` "fields": { "keyword": { "type": "keyword", - "ignore_above": 64, "normalizer": "lowercase" } } @@ -577,7 +572,6 @@ const indexSettings = ` "fields": { "keyword": { "type": "keyword", - "ignore_above": 64, "normalizer": "lowercase" } }