Then in the mapping you can set the analyzer option to my_analyzer on text fields.
Also you don't need an custom analyzer for this, I think just using the built-in simple analyzer does the same thing. The only thing you need to do is set the analyzer option to simple on a text field.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.