| Constructor and Description |
|---|
LuceneGazetteer(File indexDir)
Builds a
LuceneGazetteer by loading a pre-built Lucene
index from disk and setting configuration parameters for
resolving location names to GeoName objects. |
| Modifier and Type | Method and Description |
|---|---|
List<ResolvedLocation> |
getClosestLocations(GazetteerQuery query)
Execute a query against the Lucene gazetteer index using the provided configuration,
returning the top matches as
ResolvedLocations. |
GeoName |
getGeoName(int geonameId)
Retrieves the GeoName with the provided ID.
|
public LuceneGazetteer(File indexDir) throws ClavinException
LuceneGazetteer by loading a pre-built Lucene
index from disk and setting configuration parameters for
resolving location names to GeoName objects.indexDir - Lucene index directory to be loadedClavinException - if an error occurs opening the indexpublic List<ResolvedLocation> getClosestLocations(GazetteerQuery query) throws ClavinException
ResolvedLocations.getClosestLocations in interface Gazetteerquery - the configuration parameters for the queryClavinException - if an error occurspublic GeoName getGeoName(int geonameId) throws ClavinException
getGeoName in interface GazetteergeonameId - the ID of the requested GeoNamenull if not foundClavinException - if an error occursCopyright © 2012–2014 Berico Technologies. All rights reserved.