com.bericotech.clavin.index
Class IndexDirectoryBuilder
java.lang.Object
com.bericotech.clavin.index.IndexDirectoryBuilder
public class IndexDirectoryBuilder
- extends Object
Builds a Lucene index of geographic entries based on
the GeoNames gazetteer.
This program is run one-time before CLAVIN can be used.
|
Field Summary |
static org.slf4j.Logger |
logger
|
|
Method Summary |
static org.apache.lucene.document.Document |
buildDoc(String name,
String geonameEntry,
int geonameID,
Long population)
Builds a Lucene document to be added to the index based on a
specified name for the location and the corresponding
GeoName object. |
static void |
main(String[] args)
Turns a GeoNames gazetteer file into a Lucene index, and adds
some supplementary gazetteer records at the end. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
public static final org.slf4j.Logger logger
IndexDirectoryBuilder
public IndexDirectoryBuilder()
main
public static void main(String[] args)
throws IOException
- Turns a GeoNames gazetteer file into a Lucene index, and adds
some supplementary gazetteer records at the end.
- Parameters:
args - not used
- Throws:
IOException
buildDoc
public static org.apache.lucene.document.Document buildDoc(String name,
String geonameEntry,
int geonameID,
Long population)
- Builds a Lucene document to be added to the index based on a
specified name for the location and the corresponding
GeoName object.
- Parameters:
name - name to serve as index keygeonameEntry - string from GeoNames gazetteergeonameID - unique identifier (for quick look-up)population - number of inhabitants (used for scoring)
- Returns:
- document to be added to the index
Copyright © 2013 Berico Technologies. All rights reserved.