Created
October 12, 2011 17:36
-
-
Save ppearcy/1281923 to your computer and use it in GitHub Desktop.
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
# 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}}} | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a same problem. Can you help me:(