Fix Wiki Indexer

This commit is contained in:
Victor Shcherb 2012-01-08 01:02:53 +01:00
parent 6ccac8ee6e
commit 33ec765976
2 changed files with 7 additions and 5 deletions

View file

@ -258,13 +258,13 @@ public class WikiIndexer {
}
int sr = -1;
int se = e;
for(int i = res + prop.length() + 1; i<e; i++){
if(sr == -1 ) {
if(text.charAt(i) != '=' && !Character.isWhitespace(text.charAt(i))) {
for (int i = res + 1; i < e; i++) {
if (sr == -1) {
if (text.charAt(i) != '=' && !Character.isWhitespace(text.charAt(i))) {
sr = i;
}
} else {
if(text.charAt(i) == '|') {
if (text.charAt(i) == '|') {
se = i;
break;
}

View file

@ -217,6 +217,8 @@ public class IndexPoiCreator extends AbstractIndexPartCreator {
int minY = Integer.MAX_VALUE;
int maxY = 0;
int count = 0;
ConsoleProgressImplementation console = new ConsoleProgressImplementation();
console.startWork(1000000);
while (rs.next()) {
int x = rs.getInt(1);
int y = rs.getInt(2);
@ -226,7 +228,7 @@ public class IndexPoiCreator extends AbstractIndexPartCreator {
maxY = Math.max(y, maxY);
if(count++ > 10000){
count = 0;
log.info("proccess 10000 entities");
console.progress(10000);
}
String name = rs.getString(3);