Skip to content

Commit

Permalink
Merge pull request #14 from Ilhasoft/update/v6.5.0
Browse files Browse the repository at this point in the history
Update/v6.5.0
  • Loading branch information
matmsa27 authored Aug 3, 2021
2 parents a05ca1e + 9892c9c commit 0901834
Show file tree
Hide file tree
Showing 10 changed files with 271 additions and 285 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: CI
on: [push, pull_request]
env:
go-version: '1.16.x'
es-version: '7.10.1'
jobs:
test:
name: Test
Expand All @@ -14,7 +17,7 @@ jobs:
- name: Install ElasticSearch
uses: nyaruka/elasticsearch-action@master
with:
elastic version: '7.10.1'
elastic version: ${{ env.es-version }}

- name: Install PostgreSQL
uses: harmon758/postgresql-action@v1
Expand All @@ -27,7 +30,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: 1.15.x
go-version: ${{ env.go-version }}

- name: Run tests
run: go test -p=1 -coverprofile=coverage.text -covermode=atomic ./...
Expand All @@ -50,7 +53,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: 1.15.x
go-version: ${{ env.go-version }}

- name: Publish release
uses: goreleaser/goreleaser-action@v1
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
v6.5.0
----------
* Include contact.ticket_count as tickets in index
* Update to go 1.16
* Use embedded file for index settings
* Remove no longer used is_blocked and and is_stopped fields

v6.4.0
----------
* 6.4.0 candidate

v6.3.0
----------
* Fix creating of location keyword fields when values have punctuation

v6.2.0
----------
* add rp-indexer to .gitignore
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RapidPro Indexer
# RapidPro Indexer

[![Build Status](https://github.com/nyaruka/rp-indexer/workflows/CI/badge.svg)](https://github.com/nyaruka/rp-indexer/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/nyaruka/rp-indexer/branch/main/graph/badge.svg)](https://codecov.io/gh/nyaruka/rp-indexer)
Expand Down
186 changes: 186 additions & 0 deletions contacts/index_settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
{
"settings": {
"index": {
"number_of_shards": 2,
"number_of_replicas": 1,
"routing_partition_size": 1
},
"analysis": {
"analyzer": {
"trigrams": {
"type": "custom",
"tokenizer": "trigram",
"filter": [
"lowercase"
]
},
"locations": {
"tokenizer": "location_tokenizer",
"filter": [
"lowercase",
"word_delimiter"
]
},
"prefix": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"lowercase",
"prefix_filter"
]
},
"name_search": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"lowercase",
"max_length"
]
}
},
"tokenizer": {
"location_tokenizer": {
"type": "pattern",
"pattern": "(.* > )?([^>]+)",
"group": 2
},
"trigram": {
"type": "ngram",
"min_gram": 3,
"max_gram": 3
}
},
"normalizer": {
"lowercase": {
"type": "custom",
"char_filter": [],
"filter": [
"lowercase",
"trim"
]
}
},
"filter": {
"prefix_filter": {
"type": "edge_ngram",
"min_gram": 2,
"max_gram": 8
},
"max_length": {
"type": "truncate",
"length": 8
}
}
}
},
"mappings": {
"_doc": {
"_routing": {
"required": true
},
"properties": {
"fields": {
"type": "nested",
"properties": {
"field": {
"type": "keyword"
},
"text": {
"type": "keyword",
"normalizer": "lowercase"
},
"number": {
"type": "scaled_float",
"scaling_factor": 10000
},
"datetime": {
"type": "date"
},
"state": {
"type": "text",
"analyzer": "locations"
},
"state_keyword": {
"type": "keyword",
"normalizer": "lowercase"
},
"district": {
"type": "text",
"analyzer": "locations"
},
"district_keyword": {
"type": "keyword",
"normalizer": "lowercase"
},
"ward": {
"type": "text",
"analyzer": "locations"
},
"ward_keyword": {
"type": "keyword",
"normalizer": "lowercase"
}
}
},
"urns": {
"type": "nested",
"properties": {
"path": {
"type": "text",
"analyzer": "trigrams",
"fields": {
"keyword": {
"type": "keyword",
"normalizer": "lowercase"
}
}
},
"scheme": {
"type": "keyword",
"normalizer": "lowercase"
}
}
},
"groups": {
"type": "keyword"
},
"uuid": {
"type": "keyword"
},
"status": {
"type": "keyword"
},
"tickets": {
"type": "integer"
},
"language": {
"type": "keyword",
"normalizer": "lowercase"
},
"modified_on": {
"type": "date"
},
"created_on": {
"type": "date"
},
"modified_on_mu": {
"type": "long"
},
"last_seen_on": {
"type": "date"
},
"name": {
"type": "text",
"analyzer": "prefix",
"search_analyzer": "name_search",
"fields": {
"keyword": {
"type": "keyword",
"normalizer": "lowercase"
}
}
}
}
}
}
}
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.13.14-alpine3.12
FROM golang:1.16.6-alpine3.14

WORKDIR /app

Expand Down
7 changes: 2 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ require (
github.com/nyaruka/ezconf v0.2.1
github.com/nyaruka/gocommon v1.3.0
github.com/olivere/elastic/v7 v7.0.22
github.com/onsi/ginkgo v1.14.0 // indirect
github.com/sirupsen/logrus v1.0.5
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.5.1
gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect
)

go 1.13
go 1.16
Loading

0 comments on commit 0901834

Please sign in to comment.