Elasticsearch JAVA API Config for Synonym & AutoSuggest

How to configure of Synonyms and Auto Suggestion In Elasticsearch using Java API.