package Ġuk . gov . just ice . digital . h mp ps . indexer . config Ċ Ċ import Ġorg . elasticsearch . client . Rest High Level Client Ċ import Ġorg . springframework . beans . factory . annotation . Value Ċ import Ġorg . springframework . context . annotation . Bean Ċ import Ġorg . springframework . context . annotation . Configuration Ċ import Ġorg . springframework . data . elasticsearch . client . Client Configuration Ċ import Ġorg . springframework . data . elasticsearch . client . Rest Clients Ċ import Ġorg . springframework . data . elasticsearch . config . Abstract Elasticsearch Configuration Ċ Ċ @ Configuration Ċ class ĠElastic Search Configuration Ġ: ĠAbstract Elasticsearch Configuration () Ġ{ ĊĊĠ Ġ@ Value ("\ ${ elasticsearch . port }") ĊĠ Ġprivate Ġval Ġport Ġ= Ġ 0 ĊĊĠ Ġ@ Value ("\ ${ elasticsearch . host }") ĊĠ Ġprivate Ġval Ġhost : ĠString ? Ġ= Ġnull ĊĊĠ Ġ@ Bean (" elastic Search Client ") ĊĠ Ġoverride Ġfun Ġelasticsearch Client (): ĠRest High Level Client Ġ{ ĊĠĠĠ Ġreturn ĠRest Clients . create ( Client Configuration . builder (). connected To ("$ host :$ port "). build ()). rest () ĊĠ Ġ} Ċ } Ċ