Skip to content

Instantly share code, notes, and snippets.

@ppearcy
Created October 12, 2011 17:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ppearcy/1281923 to your computer and use it in GitHub Desktop.
Save ppearcy/1281923 to your computer and use it in GitHub Desktop.
# Create new index with dynamic analyzer - works
curl -XPOST localhost:9200/es-syntest -d '{
"settings" : {
"number_of_shards" : 1,
"analysis" : {"analyzer":{"synonym_test_analyzer":{"type":"custom","tokenizer":"standard","filter":["synonym_test"]}},"filter":{"synonym_test":{"type":"synonym","synonyms_path":"analysis/synonym_test.txt","ignore_case":true,"expand":false}}}
},
"mappings" : {
"es-syntest" : {
"properties" : {
"attachmentcontent" : { "type" : "string", "omit_norms" : true, "include_in_all" : false, "analyzer" : "synonym_test_analyzer", "term_vector" : "with_positions_offsets"}
}
}
}
}'
# Add a new analyzer to this index dynamically - doesn't work
curl -XPUT 'localhost:9200/es-syntest/_settings' -d '{
"analysis" : {"analyzer":{"white_synonym_test_analyzer":{"type":"custom","tokenizer":"whitespace","filter":["synonym_test"]}},"filter":{"synonym_test":{"type":"synonym","synonyms_path":"analysis/synonym_test.txt","ignore_case":true,"expand":false}}}
}
}'
@zolaahihi
Copy link

I have a same problem. Can you help me:(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment