Skip to content

Commit

Permalink
Merge pull request #18 from chris-erickson/reduce-shard-count
Browse files Browse the repository at this point in the history
Reduce shard count from 5 -> 2
  • Loading branch information
nicpottier authored May 30, 2019
2 parents ca85fff + 0f30535 commit b359800
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v1.0.27
----------
* update ES shards to match current ES best-practice guidance

v1.0.26
----------
* move to go module, dont ignore any keywords
Expand Down Expand Up @@ -36,7 +40,6 @@ v1.0.18

v1.0.17
----------

* change to number instead of decimal field
* add example not exists query

Expand All @@ -59,7 +62,7 @@ v1.0.13
v1.0.12
----------
* add modified_on_mu for sorting / index creation
* add prefix name for index building
* add prefix name for index building

v1.0.11
----------
Expand Down Expand Up @@ -107,4 +110,3 @@ v1.0.2
v1.0.1
----------
* Add changelog, move to fancy revving

8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,11 @@ Environment variables:
INDEXER_POLL - int
INDEXER_REBUILD - bool
```

## Development

To generate a local build for a linux amd64 architecture, use the following:

```shell
GOOS=linux GOARCH=amd64 go build github.com/nyaruka/rp-indexer/cmd/rp-indexer
```
12 changes: 6 additions & 6 deletions indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,9 @@ const indexSettings = `
{
"settings": {
"index": {
"number_of_shards": 5,
"number_of_shards": 2,
"number_of_replicas": 1,
"routing_partition_size": 3
"routing_partition_size": 1
},
"analysis": {
"analyzer": {
Expand All @@ -433,7 +433,7 @@ const indexSettings = `
"tokenizer": "standard",
"filter": [
"lowercase",
"prefix_filter"
"prefix_filter"
]
},
"name_search": {
Expand All @@ -443,7 +443,7 @@ const indexSettings = `
"lowercase",
"max_length"
]
}
}
},
"tokenizer": {
"location_tokenizer": {
Expand All @@ -465,7 +465,7 @@ const indexSettings = `
}
},
"filter": {
"prefix_filter": {
"prefix_filter": {
"type": "edge_ngram",
"min_gram": 2,
"max_gram": 8
Expand Down Expand Up @@ -564,7 +564,7 @@ const indexSettings = `
},
"modified_on_mu": {
"type": "long"
},
},
"name": {
"type": "text",
"analyzer": "prefix",
Expand Down

0 comments on commit b359800

Please sign in to comment.