Skip to content

Instantly share code, notes, and snippets.

@sameek
Created January 9, 2012 05:20
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 sameek/1581275 to your computer and use it in GitHub Desktop.
Save sameek/1581275 to your computer and use it in GitHub Desktop.
This bulk command is used to create index with custom analyzer.
{"index" : { "_index" : "test", "_type" : "type1", "_id" : "3", "_analyzer":"myanalyzer" } }
{"type1" : { "name" : "my name is john" } }
{"myanalyzer" : {"type" : "custom", "tokenizer" :"mytokenizer","filter" :"myfilter"}}
{"mytokenizer": {"type":"whitespace"}}
{"myfilter":{"type":"stop" "stopwords" : [is]}}
{"create" : { "_index" : "test", "_type" : "type1", "_id" : "3" } }
{"type1" : { "name" : "my name is john" } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment