Skip to content

Instantly share code, notes, and snippets.

@cedufca
Created October 11, 2011 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cedufca/1279224 to your computer and use it in GitHub Desktop.
Save cedufca/1279224 to your computer and use it in GitHub Desktop.
ElasticSearch 11/10/11 - Mappings and Settings
mappings:
event:
index_analyzer: standardAnalyzer
search_analyzer: standardAnalyzer
properties:
name:
type: multi_field
fields:
name: { type: string, index: analyzed }
partial: { type: string, index: analyzed, index_analyzer: ngramAnalyzer, search_analyzer: standardAnalyzer }
description:
type: multi_field
fields:
description: { type: string, index: analyzed }
partial: { type: string, index: analyzed, index_analyzer: ngramAnalyzer, search_analyzer: standardAnalyzer }
address:
type: multi_field
fields:
address: { type: string, index: analyzed }
partial: { type: string, index: analyzed, index_analyzer: ngramAnalyzer, search_analyzer: standardAnalyzer }
programs:
type: multi_field
fields:
programs: { type: string, index: analyzed }
partial: { type: string, index: analyzed, index_analyzer: ngramAnalyzer, search_analyzer: standardAnalyzer }
date_time_end:
type: date
index: not_analyzed
format: "yyyy-MM-dd||yyyy-MM-dd HH:mm:ss"
settings:
analysis:
filter:
defaultNGram:
type: edgeNGram
side: front
min_gram: 1
max_gram: 10
analyzer:
ngramAnalyzer:
type: custom
tokenizer: standard
filter: [standard, lowercase, asciifolding, defaultNGram]
standardAnalyzer:
type: custom
tokenizer: standard
filter: [standard, lowercase, asciifolding]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment