public abstract class GeoNamesQueryLuceneIndex extends Object implements GeoEntryQueryable
Constructor and Description |
---|
GeoNamesQueryLuceneIndex() |
Modifier and Type | Method and Description |
---|---|
protected abstract org.apache.lucene.index.IndexReader |
createIndexReader(org.apache.lucene.store.Directory directory) |
protected abstract org.apache.lucene.search.IndexSearcher |
createIndexSearcher(org.apache.lucene.index.IndexReader indexReader) |
protected org.apache.lucene.search.Query |
createQuery(String queryString) |
protected String |
doGetCountryCode(org.locationtech.spatial4j.shape.Shape shape,
int radiusInKm,
org.apache.lucene.store.Directory directory) |
protected List<NearbyLocation> |
doGetNearestCities(org.locationtech.spatial4j.shape.Shape shape,
int radiusInKm,
int maxResults,
org.apache.lucene.store.Directory directory) |
protected List<GeoEntry> |
doQuery(String queryString,
int maxResults,
org.apache.lucene.store.Directory directory) |
protected boolean |
indexExists(org.apache.lucene.store.Directory directory) |
protected abstract org.apache.lucene.store.Directory |
openDirectory() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCountryCode, getNearestCities, query
protected abstract org.apache.lucene.store.Directory openDirectory() throws IOException
IOException
protected abstract org.apache.lucene.index.IndexReader createIndexReader(org.apache.lucene.store.Directory directory) throws IOException
IOException
protected abstract org.apache.lucene.search.IndexSearcher createIndexSearcher(org.apache.lucene.index.IndexReader indexReader)
protected boolean indexExists(org.apache.lucene.store.Directory directory) throws IOException
IOException
protected List<GeoEntry> doQuery(String queryString, int maxResults, org.apache.lucene.store.Directory directory) throws GeoEntryQueryException
GeoEntryQueryException
protected org.apache.lucene.search.Query createQuery(String queryString) throws org.apache.lucene.queryparser.classic.ParseException
org.apache.lucene.queryparser.classic.ParseException
protected List<NearbyLocation> doGetNearestCities(org.locationtech.spatial4j.shape.Shape shape, int radiusInKm, int maxResults, org.apache.lucene.store.Directory directory) throws GeoEntryQueryException
GeoEntryQueryException
protected String doGetCountryCode(org.locationtech.spatial4j.shape.Shape shape, int radiusInKm, org.apache.lucene.store.Directory directory) throws GeoEntryQueryException
GeoEntryQueryException
This work is licensed under a Creative Commons Attribution 4.0 International License.