forked from nyaruka/rp-indexer
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to go 1.16, use embedded file for index settings, remove no lo…
…nger used is_blocked and and is_stopped fields
- Loading branch information
1 parent
d66e01a
commit db35672
Showing
6 changed files
with
201 additions
and
256 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
{ | ||
"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" | ||
}, | ||
"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" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.