public class GeoNamesLuceneIndexer extends Object implements GeoEntryIndexer
| Modifier and Type | Field and Description |
|---|---|
static org.apache.lucene.search.similarities.ClassicSimilarity |
SIMILARITY |
| Constructor and Description |
|---|
GeoNamesLuceneIndexer() |
| Modifier and Type | Method and Description |
|---|---|
void |
setIndexLocation(String indexLocation) |
void |
updateIndex(List<GeoEntry> geoEntryList,
boolean create,
ProgressCallback progressCallback)
|
void |
updateIndex(String resource,
GeoEntryExtractor geoEntryExtractor,
boolean create,
ProgressCallback progressCallback)
Updates a GeoNames index with
GeoEntry objects extracted by a GeoEntryExtractor. |
public static final org.apache.lucene.search.similarities.ClassicSimilarity SIMILARITY
public void setIndexLocation(String indexLocation)
public void updateIndex(List<GeoEntry> geoEntryList, boolean create, ProgressCallback progressCallback) throws GeoEntryIndexingException
GeoEntryIndexerupdateIndex in interface GeoEntryIndexergeoEntryList - the List of GeoEntry objects to add to the indexcreate - true will create a new index and false will add to the existing indexprogressCallback - the callback to receive updates about the indexing progress, may be
null if you don't want any updatesGeoEntryIndexingException - if an error occurs while indexing the new entriespublic void updateIndex(String resource, GeoEntryExtractor geoEntryExtractor, boolean create, ProgressCallback progressCallback) throws GeoEntryIndexingException, GeoEntryExtractionException, GeoNamesRemoteDownloadException
GeoEntryIndexerGeoEntry objects extracted by a GeoEntryExtractor.updateIndex in interface GeoEntryIndexerresource - the resource containing GeoNames entriesgeoEntryExtractor - the GeoEntryExtractor that will extract GeoEntry
objects from resourcecreate - true will create a new index and false will add to the existing indexprogressCallback - the callback to receive updates about the indexing progress, may be
null if you don't want any updatesGeoEntryIndexingException - if an error occurs while indexing the new entriesGeoEntryExtractionException - if an error occurs while extracting GeoNames entries from
the resourceGeoNamesRemoteDownloadException - if an error occurs while downloading from a remote
sourceThis work is licensed under a Creative Commons Attribution 4.0 International License.