* Configure NetworkTypeahead
*/
NetworkTypeaheadConfig<TypeaheadElement> config =
TypeaheadConfigFactory.createNetworkTypeaheadConfig(properties);
config.setElementStoreCached(false); // disable cache to bypass serialization
config.setElementStoreSegmentFactory(new ChannelSegmentFactory());
config.setConnectionsStoreSegmentFactory(new WriteBufferSegmentFactory(config.getConnectionsStoreSegmentMB()));
WeightedNetworkTypeaheadInitializer<TypeaheadElement> initializer =
new WeightedNetworkTypeaheadInitializer<TypeaheadElement>(config);
WeightedNetworkTypeahead<TypeaheadElement> typeahead =