Fix wiki
This commit is contained in:
parent
2914df8cb7
commit
a91934bee6
1 changed files with 6 additions and 1 deletions
|
@ -147,7 +147,12 @@ public class WikiIndexer {
|
||||||
BufferedWriter out = null;
|
BufferedWriter out = null;
|
||||||
try {
|
try {
|
||||||
int in = f.getName().indexOf('.');
|
int in = f.getName().indexOf('.');
|
||||||
String wikiLocale = f.getName().substring(in + 1, f.getName().indexOf('.', in));
|
int in2 = f.getName().indexOf('.', in + 1);
|
||||||
|
if (in2 == -1) {
|
||||||
|
log.error("File was not processed " + f.getName() + " please use name <Index-name>.<2Letters-Locale>.xml.bz2");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
String wikiLocale = f.getName().substring(in + 1, in2);
|
||||||
log.info("Locale for file " + wikiLocale);
|
log.info("Locale for file " + wikiLocale);
|
||||||
|
|
||||||
PreparedStatement statement = dbConnection.prepareStatement("SELECT gc_lat, gc_lon, gc_type FROM coord_"+wikiLocale+"wiki WHERE gc_from=?");
|
PreparedStatement statement = dbConnection.prepareStatement("SELECT gc_lat, gc_lon, gc_type FROM coord_"+wikiLocale+"wiki WHERE gc_from=?");
|
||||||
|
|
Loading…
Reference in a new issue