Skip to content

Instantly share code, notes, and snippets.

@BowlingX
Created December 9, 2011 15:46
Show Gist options
  • Save BowlingX/1452046 to your computer and use it in GitHub Desktop.
Save BowlingX/1452046 to your computer and use it in GitHub Desktop.
Geonames.org Meta for elastic search
{
state: open
settings: {
index.analysis.filter.name_ngrams.side: front
index.analysis.filter.name_ngrams.type: edgeNGram
index.analysis.analyzer.full_name.type: custom
index.analysis.filter.name_ngrams.max_gram: 40
index.analysis.analyzer.full_name.tokenizer: standard
index.analysis.analyzer.partial_name.filter.3: name_ngrams
index.analysis.filter.name_ngrams.min_gram: 2
index.analysis.analyzer.partial_name.filter.0: standard
index.analysis.analyzer.partial_name.tokenizer: standard
index.analysis.analyzer.partial_name.filter.1: lowercase
index.analysis.analyzer.partial_name.filter.2: asciifolding
index.analysis.analyzer.full_name.filter.0: standard
index.analysis.analyzer.full_name.filter.2: asciifolding
index.analysis.analyzer.full_name.filter.1: lowercase
index.analysis.analyzer.partial_name.type: custom
index.number_of_shards: 5
index.number_of_replicas: 1
}
{
mappings: {
location: {
properties: {
alternateNames: {
properties: {
isShortName: {
type: boolean
}
name: {
type: multi_field
fields: {
name: {
store: yes
analyzer: full_name
type: string
}
partial: {
include_in_all: false
index_analyzer: partial_name
search_analyzer: full_name
type: string
}
}
}
isPreferredName: {
type: boolean
}
lang: {
type: string
}
}
}
admin4: {
type: string
}
admin3: {
type: string
}
lonlat: {
type: geo_point
}
admin2: {
type: string
}
locid: {
type: long
}
admin1: {
type: string
}
asciiname: {
type: string
}
name: {
type: multi_field
fields: {
name: {
analyzer: full_name
term_vector: with_positions_offsets
type: string
}
partial: {
include_in_all: false
index_analyzer: partial_name
search_analyzer: full_name
term_vector: with_positions_offsets
type: string
}
}
}
featureCode: {
type: string
}
countryCode: {
type: string
}
population: {
type: long
}
}
}
locationAlternateNames: {
properties: {
isShortName: {
type: boolean
}
location: {
type: long
}
name: {
type: string
}
isPreferredName: {
type: boolean
}
isoLanguage: {
type: string
}
}
}
}
aliases: [ ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment