public interface IndexUpdater
IndexPacker
.
The following snippet shows how to update/download remote index:
IndexingContext context = indexer.getIndexingContexts().get( indexId ); Settings settings = embedder.getSettings(); Proxy proxy = settings.getActiveProxy(); ProxyInfo proxyInfo = null; if ( proxy != null ) { proxyInfo = new ProxyInfo(); proxyInfo.setHost( proxy.getHost() ); proxyInfo.setPort( proxy.getPort() ); proxyInfo.setNonProxyHosts( proxy.getNonProxyHosts() ); proxyInfo.setUserName( proxy.getUsername() ); proxyInfo.setPassword( proxy.getPassword() ); } Date indexTime = updater.fetchAndUpdateIndex( context, transferListener, proxyInfo ); ...
Modifier and Type | Method and Description |
---|---|
IndexUpdateResult |
fetchAndUpdateIndex(IndexUpdateRequest updateRequest) |
IndexUpdateResult fetchAndUpdateIndex(IndexUpdateRequest updateRequest) throws IOException
IOException
Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.